GitHub pull requests
When a PR is merged, is it closed automatically or do we need to do something to close it?
-- ~Ethan~
If you want the associated bpo ticket to be closed when the PR is merged, you have to add the commit message saying "closes <bpo url>" (Note that we should document this: https://github.com/python/devguide/issues/502)
If you want the the associated GitHub Issue to be closed, it is similar, you have to add to the commit message or the PR description: "closes <github pr url>" Documentation: https://docs.github.com/en/github/managing-your-work-on-github/linking-a-pul...
On 7/9/2020 3:29 PM, Mariatta wrote:
If you want the associated bpo ticket to be closed when the PR is merged, you have to add the commit message saying "closes <bpo url>" (Note that we should document this: https://github.com/python/devguide/issues/502)
Is there a way to do this if you have automerge set? I don't see a way to control the commit message in that case, but I could easily be missing something.
Eric
If you want the the associated GitHub Issue to be closed, it is similar, you have to add to the commit message or the PR description: "closes <github pr url>" Documentation: https://docs.github.com/en/github/managing-your-work-on-github/linking-a-pul...
python-committers mailing list -- python-committers@python.org To unsubscribe send an email to python-committers-leave@python.org https://mail.python.org/mailman3/lists/python-committers.python.org/ Message archived at https://mail.python.org/archives/list/python-committers@python.org/message/Z... Code of Conduct: https://www.python.org/psf/codeofconduct/
On 7/9/2020 4:01 PM, Mariatta wrote:
Is there a way to do this if you have automerge set? I don't see a way to control the commit message in that case, but I could easily be missing something.
Yes, you need to edit the PR description. Automerge will take the PR description as the commit message.
Ah. Thanks!
Eric
On 7/9/2020 3:29 PM, Mariatta wrote:
If you want the associated bpo ticket to be closed when the PR is merged, you have to add the commit message saying "closes <bpo url>" (Note that we should document this: https://github.com/python/devguide/issues/502)
If there are backports, which is nearly always for me, I prefer to not close until the issue is really done. Once could edit the commit message of the last one, but cannot know which of two will be last until one is merged.
On 7/9/2020 3:24 PM, Mariatta wrote:
is it closed automatically ?
What is "it"? The PR itself? yes the PR becomes closed if it is merged.
The branch in your github fork is not automatically deleted. There is a button on the PR to do so. I don't know if the devguide mentions this.
The branch on your local repository is not automatically deleted when the branch on your fork is deleted. I try to remember to do it manually after hitting the button. I occassionally look through the fork branches for those that are obsolete.
participants (4)
-
Eric V. Smith
-
Ethan Furman
-
Mariatta
-
Terry Reedy