From 48ffd3b86d53e4910ffe5a39869a2d74e75acc66 Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Fri, 6 May 2022 08:00:14 +0200 Subject: [PATCH 1/5] Document auto-closing keywords for PRs. --- gitbootcamp.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gitbootcamp.rst b/gitbootcamp.rst index 9196da0817..84b0f124bd 100644 --- a/gitbootcamp.rst +++ b/gitbootcamp.rst @@ -295,6 +295,15 @@ Creating a Pull Request 6. Press the ``Create pull request`` button. +You should include the issue number (``GH-NNNN``) in the title and in the +body of the PR. + +You might also use `special keywords +`_ +to automatically close the linked issue once the PR is merged, however you +should avoid them if other PRs need to be merged before the issue can be +closed (e.g. backports to other branches). + Updating your CPython Fork -------------------------- From 34d208040977433d060a0973c11d3c889d91ee93 Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Tue, 12 Jul 2022 03:35:34 +0200 Subject: [PATCH 2/5] Bedevere now adds the issue number in the body. --- getting-started/git-boot-camp.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/getting-started/git-boot-camp.rst b/getting-started/git-boot-camp.rst index bfefbebad9..c6a22d6586 100644 --- a/getting-started/git-boot-camp.rst +++ b/getting-started/git-boot-camp.rst @@ -283,8 +283,7 @@ Creating a Pull Request 6. Press the ``Create pull request`` button. -You should include the issue number (``GH-NNNN``) in the title and in the -body of the PR. +You should include the issue number in the title of the PR (``gh-NNNNN: ...``). You might also use `special keywords `_ From 7a799a2da1fab7b75dfe78b091ed5a165634af3f Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Wed, 13 Jul 2022 03:19:35 +0200 Subject: [PATCH 3/5] Apply suggestions from code review Co-authored-by: CAM Gerlach --- getting-started/git-boot-camp.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/getting-started/git-boot-camp.rst b/getting-started/git-boot-camp.rst index c6a22d6586..a436637efc 100644 --- a/getting-started/git-boot-camp.rst +++ b/getting-started/git-boot-camp.rst @@ -283,11 +283,12 @@ Creating a Pull Request 6. Press the ``Create pull request`` button. -You should include the issue number in the title of the PR (``gh-NNNNN: ...``). +You should include the issue number in the title of the PR, +in the format ``gh-NNNNN: ``. You might also use `special keywords `_ -to automatically close the linked issue once the PR is merged, however you +to automatically close the linked issue once the PR is merged. However, you should avoid them if other PRs need to be merged before the issue can be closed (e.g. backports to other branches). From a279ae18b50c6a66ed7e282b4ca5a49e590c8a89 Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Thu, 18 Aug 2022 06:57:03 +0200 Subject: [PATCH 4/5] Add a new entry about linking to issues/PRs. --- getting-started/git-boot-camp.rst | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/getting-started/git-boot-camp.rst b/getting-started/git-boot-camp.rst index a436637efc..600e4278dd 100644 --- a/getting-started/git-boot-camp.rst +++ b/getting-started/git-boot-camp.rst @@ -286,11 +286,24 @@ Creating a Pull Request You should include the issue number in the title of the PR, in the format ``gh-NNNNN: ``. -You might also use `special keywords -`_ -to automatically close the linked issue once the PR is merged. However, you -should avoid them if other PRs need to be merged before the issue can be -closed (e.g. backports to other branches). +Linking to Issues and Pull Requests +----------------------------------- + +You can link to issues and pull requests using ``gh-NNNNN`` (this form is +preferred over ``#NNNNN``). If the reference appears in a list, the link +will be expanded to show the status and title of the issue/PR. + +When you create a PR that includes ``gh-NNNNN`` in the title, `bedevere`_ +will automatically add a link to the issue in the first message. + +In addition, pull requests support `special keywords`_ that can be used to +link to an issue and automatically close it when the PR is merged. +However, issues often require multiple PRs before they can be closed (e.g. +backports to other branches), so this features is only useful when +a single PR is enough to address and close the issue. + +.. _bedevere: https://github.com/python/bedevere +.. _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 Updating your CPython Fork -------------------------- From 30b5f7dfd23a0140b09df04c287a81e62766e5db Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Sun, 21 Aug 2022 18:28:02 +0200 Subject: [PATCH 5/5] Make sentence more explicit. Co-authored-by: Alex Waygood --- getting-started/git-boot-camp.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/getting-started/git-boot-camp.rst b/getting-started/git-boot-camp.rst index 600e4278dd..4d6aab073e 100644 --- a/getting-started/git-boot-camp.rst +++ b/getting-started/git-boot-camp.rst @@ -299,8 +299,8 @@ will automatically add a link to the issue in the first message. In addition, pull requests support `special keywords`_ that can be used to link to an issue and automatically close it when the PR is merged. However, issues often require multiple PRs before they can be closed (e.g. -backports to other branches), so this features is only useful when -a single PR is enough to address and close the issue. +backports to other branches), so this features is only useful if +you know for sure that a single PR is enough to address and close the issue. .. _bedevere: https://github.com/python/bedevere .. _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