@@ -560,93 +560,7 @@ does **NOT** stop it.
560560
561561.. _branch-merge :
562562
563- Backporting merged changes
564- --------------------------
565-
566- After a pull request has been merged into ``main ``, it may need to be backported
567- to one or more :ref: `maintenance <maintbranch >` or :ref: `security <secbranch >`
568- branches. This is indicated by the :samp: `needs backport to { X.Y } ` labels on
569- the pull request.
570-
571- ``miss-islington `` will automatically attempt to create backport PRs for the
572- versions indicated by these labels. If ``miss-islington `` cannot create a
573- backport PR due to conflicts, you can use the :pypi: `cherry-picker ` tool to
574- create the backport and resolve the conflicts manually.
575-
576- You need the commit hash of the squashed commit that was merged into
577- the ``main `` branch. ``miss-islington `` should post a comment when it is unable
578- to create the backport automatically, including the full command and commit hash.
579- If that comment is not posted, look for an event on the merged
580- pull request similar to:
581-
582- .. code-block :: text
583-
584- <core_developer> merged commit <commit_sha1> into python:main <sometime> ago.
585-
586- By following the link to ``<commit_sha1> ``, you can get the full commit hash.
587-
588- Alternatively, the commit hash can also be obtained with the following Git
589- commands::
590-
591- $ git fetch upstream
592- $ git rev-parse ":/gh-<PR number>"
593-
594- These commands print the hash of the commit whose message contains ``gh-<PR number> ``.
595-
596- You can then use the commit hash and the :pypi: `cherry-picker ` tool to create
597- the backport. In the following command, ``<branch> `` is the target maintenance
598- branch (for example, ``3.12 ``):
599-
600- .. code-block :: text
601-
602- $ cherry_picker <commit_sha1> <branch>
603-
604- Then, follow the instructions provided. You will have to identify the files
605- with conflicts, fix them, and build and run applicable tests if necessary.
606- When you are finished, ``git add `` all modified files and run
607- ``cherry_picker --continue `` to push the backport.
608-
609- The tool usually generates the commit message automatically. If it does not, use
610- the following format: Keep the original commit message unchanged, except for
611- removing the backport pull request number (``(#XXXXX) ``). At the end of the
612- message, append a ``(cherry picked from commit <commit_sha1>) `` line.
613-
614- The format of a correct backport commit message is:
615-
616- .. code-block :: text
617- :class: good
618-
619- [<branch>] gh-XXXXX: <original commit title> (GH-XXXXX)
620-
621- <original commit body>
622-
623- (cherry picked from commit <commit_sha1>)
624-
625- Here ``gh-XXXXX `` is the GitHub *issue * number, and ``(GH-XXXXX) `` is the
626- original *pull request * number.
627-
628- An example of a bad backport commit message:
629-
630- .. code-block :: text
631- :class: bad
632-
633- gh-XXXXX: Custom title (GH-XXXXX) (#XXXXX)
634-
635- * Custom message
636-
637- .. _backport-pr :
638-
639- When opening the backport PR, its title PR must follow the same format as the
640- commit title, beginning with the ``[<branch>] `` prefix and referencing the
641- original PR with a ``(GH-XXXXX) `` suffix. For example:
642-
643- .. code-block :: text
644- :class: good
645-
646- [3.15] gh-12345: Fix the spam module (GH-24680)
647-
648- After the backport PR is opened, ``miss-islington `` will link it to the original
649- PR and remove the corresponding backport label.
563+ For instructions on backporting a merged change, see :ref: `backporting `.
650564
651565
652566Editing a pull request prior to merging
0 commit comments