简体   繁体   中英

Github: use pull request description as merge commit message?

Using Github to manage a repo, by default, the pull request title is used as the merge commit message.

I would like to use the pull request body as the default merge commit message. Yes, I could copy-paste this into the editor whenever merging a PR, but I'd rather automate this part of the process and not rely on the PR author to remember to copy-paste.

Is there a configuration option to do this somewhere that I'm missing, or a plugin or automated tool that does something like this? Thanks!

A screenshot of creating a Github PR to make it clear:

Github PR 创建画面

(Note that I'm not looking for evangelism about what PRs or commit messages should look like, just technical advice on how to achieve a specific goal.)

Per this documentation , the default generated commit message depends on the number of commits in the PR - if it's one, that commit message is used. If it's more, the summary will be the PR title, and the description will be a list of the commits in the PR.

The only configuration option I find in the docs relating to this is here , which allows you to default to using the PR title for all squash merges. Currently I don't believe there is a way to accomplish what you want without just copy-pasting it yourself.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM