You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PR merge should allow to choose how to format the commit message #1621
Describe the feature or problem you’d like to solve
gh pr merge is GREAT, it speeds up my workflow a lot, but I find it very annoying that the commit message of the squashed merge action is the last HEAD commit instead of being the PR name/title.
On the website I can change the PR commit message when I'm about to merge it, but using the CLI it's not possible.
Proposed solution
Proposed solution would be to have a preview of the commit message directly inside the CLI, with the ability to choose how to format the commit.
I propose to have 3 different options:
PR name (the title which is displayed on the website)
Last commit (the current behaviour)
Custom message
I don't know if this is something which is to be configured directly in Github settings, but this will greatly benefit the workflow, since I could have in the repo history a way more useful message than the last commit on the HEAD branch (which might be, as usually happens to me, "rebasing master" or "fix linting" or something similar, whereas the message should have been "Add validation logic to Resource (#7)")
Additional context
I would be more than happy to contribute to this feature myself, I'd simply need some guidance since I'm not an expert in either Github GraphQL API or Golang.
Yikes, that default message won't work at all. Thanks for reporting!
Ideally, the default commit subject should be <TITLE> (#<PRNUMBER>) to match the web UI's default behavior. In the first iteration, we don't have to provide facilities for editing the commit message, but we can consider that for the future.
@achimnol is right; now that the default squash message has been fixed (thanks, @giacomoalbe), the rest of the feature described here is a duplicate of the conversation in #1023. 🙇
Activity
mislav commentedon Sep 4, 2020
Yikes, that default message won't work at all. Thanks for reporting!
Ideally, the default commit subject should be
<TITLE> (#<PRNUMBER>)to match the web UI's default behavior. In the first iteration, we don't have to provide facilities for editing the commit message, but we can consider that for the future.You can try adding a
CommitHeadlinefield here:cli/api/queries_pr.go
Lines 985 to 988 in 0083607
Something like:
achimnol commentedon Sep 18, 2020
Bump #1023 again here.
mislav commentedon Sep 18, 2020
@achimnol is right; now that the default squash message has been fixed (thanks, @giacomoalbe), the rest of the feature described here is a duplicate of the conversation in #1023. 🙇