Skip to content

Commit 97a229f

Browse files
ezio-melottiCAM-GerlachAlexWaygood
authored
Document auto-closing keywords for PRs. (#855)
* Document auto-closing keywords for PRs. * Bedevere now adds the issue number in the body. * Apply suggestions from code review Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM> * Add a new entry about linking to issues/PRs. * Make sentence more explicit. Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
1 parent 7a2a18b commit 97a229f

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

getting-started/git-boot-camp.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,28 @@ Creating a Pull Request
283283

284284
6. Press the ``Create pull request`` button.
285285

286+
You should include the issue number in the title of the PR,
287+
in the format ``gh-NNNNN: <PR Title>``.
288+
289+
Linking to Issues and Pull Requests
290+
-----------------------------------
291+
292+
You can link to issues and pull requests using ``gh-NNNNN`` (this form is
293+
preferred over ``#NNNNN``). If the reference appears in a list, the link
294+
will be expanded to show the status and title of the issue/PR.
295+
296+
When you create a PR that includes ``gh-NNNNN`` in the title, `bedevere`_
297+
will automatically add a link to the issue in the first message.
298+
299+
In addition, pull requests support `special keywords`_ that can be used to
300+
link to an issue and automatically close it when the PR is merged.
301+
However, issues often require multiple PRs before they can be closed (e.g.
302+
backports to other branches), so this features is only useful if
303+
you know for sure that a single PR is enough to address and close the issue.
304+
305+
.. _bedevere: https://github.com/python/bedevere
306+
.. _special keywords: https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword
307+
286308
Updating your CPython Fork
287309
--------------------------
288310

0 commit comments

Comments
 (0)