Description
Feature description
Currently the PR template includes the following checklist item:
If this pull request resolves one or more open issues then the commit message contains
Fixes: #{$ISSUE_NO}
.
I think it's better to ask contributors to put issue numbers in the PR description rather than the commit message for the following reasons:
-
The vast majority of contributors to this repo (myself included) don't put closing keywords in commit messages. In my experience, the norm on GitHub is to put them in the PR description.
-
Since contributors typically make their commits in their local git repos and not directly on GitHub, it's less convenient to include the issue number because git can't autocomplete GitHub issue numbers.
-
A PR that resolves an issue often includes multiple commits, so no single commit single-handedly resolves the issue. Thus, putting the issue number in the PR description makes more sense IMO.
-
From the GitHub docs:
You can also use closing keywords in a commit message. The issue will be closed when you merge the commit into the default branch, but the pull request that contains the commit will not be listed as a linked pull request.
Therefore, even if one puts the issue number with a closing keyword in a commit, GitHub won't automatically link the PR that it's a part of, which makes it slightly harder to refer back to the original issue.
We can also link to the GitHub docs (see above) in the checklist item to help contributors use the closing keywords correctly.