RFR: 1797: Add support for /backport pull request command [v2]

Zhao Song zsong at openjdk.org
Wed Feb 1 22:43:45 UTC 2023


> 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 and begins the backporting process. 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.

Zhao Song has updated the pull request incrementally with four additional commits since the last revision:

 - Update bots/pr/src/main/java/org/openjdk/skara/bots/pr/BackportCommand.java
   
   Co-authored-by: Erik Joelsson <37597443+erikj79 at users.noreply.github.com>
 - Update bots/pr/src/main/java/org/openjdk/skara/bots/pr/BackportCommand.java
   
   Co-authored-by: Erik Joelsson <37597443+erikj79 at users.noreply.github.com>
 - Update bots/pr/src/main/java/org/openjdk/skara/bots/pr/BackportCommand.java
   
   Co-authored-by: Erik Joelsson <37597443+erikj79 at users.noreply.github.com>
 - Update bots/pr/src/main/java/org/openjdk/skara/bots/pr/BackportCommand.java
   
   Co-authored-by: Erik Joelsson <37597443+erikj79 at users.noreply.github.com>

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

Changes:
  - all: https://git.openjdk.org/skara/pull/1466/files
  - new: https://git.openjdk.org/skara/pull/1466/files/4af54f93..8e6feb06

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=skara&pr=1466&range=01
 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1466&range=00-01

  Stats: 5 lines in 1 file changed: 0 ins; 0 del; 5 mod
  Patch: https://git.openjdk.org/skara/pull/1466.diff
  Fetch: git fetch https://git.openjdk.org/skara pull/1466/head:pull/1466

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


More information about the skara-dev mailing list