How to close a GitHub pull request with a commit message?

后端 未结 1 640
生来不讨喜
生来不讨喜 2021-01-17 08:41

My team uses pull requests internally for code-reviewing the application we maintain, but when it\'s time to merge a commit, we just push directly to master. We

相关标签:
1条回答
  • You probably want to look at this GitHub help page. It says:

    You can use any of the following keywords to close an issue via commit message:

    • close
    • closes
    • closed
    • fix
    • fixes
    • fixed
    • resolve
    • resolves
    • resolved

    So "Fixes #123" or "Resolved #456" will work. All pull requests are mapped as issues, so this will works for pull requests too.

    Note: you'll see a message about unmerged commits because you amended the pull request. So looking at the pull request, it won't be immediately obvious that the PR was incorporated (versus just plain closed) unless you put something meaningful in the first line of the commit message so you can see the message in the pull request.

    0 讨论(0)
提交回复
热议问题