[Python-Dev] GH-NNNN vs #NNNN in merge commit
2018-01-25 22:55 GMT+01:00 Mariatta Wijaya <mariatta.wijaya at gmail.com>:
> My problem has been that I almost always still need to rewrite the commit
> Especially when someone wrote "fix a typo" or "fix several typos".
That's the main drawback of GitHub compared to Gerrit. On Gerrit, the
commit message is at the same level than other changes. We can comment
the commit message as we comment the change.
Note: On Gerrit, it's even possible to edit the commit message online
(using the web browser).
> If it automatically merges, then there's no opportunity to adjust the commit
Maybe we need a tool to preview the future commit message, and let the
developer modify it.
For example, a merge request would add a comment to the PR with the
future commit message and then asks to validate the commit message, or
let the developer to override (modify) it.
Comment 4, dev: "Merge"
Comment 5, bot: "bpo-123: Cool fix"
Comment 6, dev: "Confirm merge"
Comment 7, GitHub: "PR merged, commit xxx"
> So I suggest the option to provide the proper commit message to the
Sometimes, the commit message is just fine and can be used unchanged ;-)
> If not provided, I guess we'll use the GitHub PR title and description.
Sometimes, I see a typo in the commit message after I push a change.
In this case, I quickly amend my commit and push my commit again. But
the PR description keeps my original commit message with the typo. So
the PR description is not reliable. It doesn't seem to be used by
GitHub to generate the commit message, GitHub combines commit messages
of the PR commits.