-
-
Notifications
You must be signed in to change notification settings - Fork 864
Do not recommend to gh- prefix in commit message #841
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
pullrequest.rst
Outdated
| @@ -346,7 +346,7 @@ Now you want to | |||
| <https://help.github.com/articles/creating-a-pull-request-from-a-fork/>`_. | |||
| If this is a pull request in response to a pre-existing issue on the | |||
| `issue tracker`_, please make sure to reference the issue number using | |||
| ``gh-NNNN`` in the pull request title or message. | |||
| ``gh-NNNNN: `` in the pull request title. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently GitHub ignores the gh-NNNNN: in the title, so a gh-NNNNN in the message helps adding an event in the issue timeline. We should recommend both (at least until GitHub fixes title mentions:
| ``gh-NNNNN: `` in the pull request title. | |
| ``gh-NNNNN: `` in the pull request title and `gh-NNNNN` in the issue body. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we have gh-NNNNN in title, how about just #NNNNN in body?
GitHub doesn't contain pull request body in squash commit message by default.
So #NNNNN won't be contained in the commit message.
If core developer copy&paste the pull request message to squash commit message, they would just trim the #NNNNN. They don't need to rewrite it to gh-NNNNN form because it is included in the first line of the commit message already.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we have gh-NNNNN in title, how about just #NNNNN in body?
That works too. The goal of adding it in the body is just to reference the issue and create an event there, and both gh-NNNNN and #NNNNN work.
|
Since PRs are squash-merged, I agree that we don't need to include the issue number in every commit. Before the merge the commits will be already contextualized within the branch/PR (so the issue number is known). After the squash-merge the commit message will link back to the PR, and from the PR it's easy to find the issue. Should we recommend to add the |
| @@ -346,7 +346,7 @@ Now you want to | |||
| <https://help.github.com/articles/creating-a-pull-request-from-a-fork/>`_. | |||
| If this is a pull request in response to a pre-existing issue on the | |||
| `issue tracker`_, please make sure to reference the issue number using | |||
| ``gh-NNNN`` in the pull request title or message. | |||
| ``gh-NNNNN: `` in the pull request title and ``#NNNNN`` in the description. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. I fixed it in #844.

If we add
gh-prefix to each commits, many spammy notification send to the issue.See this ecample:
We should recommend
gh-prefix only in pull request title (and merge commit title).