Integrated: 1797: Add support for /backport pull request command

Zhao Song zsong at openjdk.org
Mon Feb 6 22:29:35 UTC 2023


On Wed, 1 Feb 2023 20:38:53 GMT, Zhao Song <zsong at openjdk.org> wrote:

> This patch introduces support for the /backport command in pull requests. (ErikJ and ErikH proposed the idea and came up with this implementation.)
> 
> Usage of /backport in pull request:
> 
> Syntax: `/backport <repo> [<branch>] ` ` /backport disable <repo> [<branch>]` (default branch is master)
> 
> 1. If the `/backport` command is used in an **open** pull request, it adds a label `Backport=repo:branch` to the PR. If the PR is later integrated, the PR bot scans for backport labels, creates the backport branch and provides a link for creating the backport. To cancel the backport, the user can use `/backport disable repo master` to remove the label before the PR is integrated.
> 2.  If the `/backport` command is used in an **integrated** PR, it creates the backport branch and comments on the PR. This process is similar to using the /backport command in commits. (This feature was implemented in [SKARA-1495](https://bugs.openjdk.org/browse/SKARA-1495) by guoxiong li, but the usage was not documented on the[ wiki page](https://wiki.openjdk.org/display/SKARA/Pull+Request+Commands), so seems like few people use this command)
> 3.  If the `/backport` command is used in a **closed** (not integrated) PR, the user will receive an error message stating that the command cannot be used in a closed but not integrated PR.

This pull request has now been integrated.

Changeset: 6b036dd7
Author:    Zhao Song <zsong at openjdk.org>
URL:       https://git.openjdk.org/skara/commit/6b036dd7d88f2cf445e3f0ab8fabab8d837572b8
Stats:     347 lines in 5 files changed: 309 ins; 2 del; 36 mod

1797: Add support for /backport pull request command

Reviewed-by: erikj

-------------

PR: https://git.openjdk.org/skara/pull/1466


More information about the skara-dev mailing list