...
In certain cases, the original commit for a fix is not publicly available, but a "backport pull request" still needs to be created. For this case, there is an alternate format for the pull request title: "Backport <issueId>" (e.g. "Backport JDK-1234567"). This will initiate the pull request as a "backport pull request", but without any reference to the original commit. This means that the commit message will also not contain the Backport-of
trailer. The only real advantage of declaring a pull request in this way, compared to a normal pull request, is to avoid getting a warning about the issue not being open, and of course to clearly communicate to reviewers the intent of the change being a backport. Omitting the backport declaration for this kind of pull request will not affect the format of the commit message, nor how a backport issue is created in JBS.
Backport Commit/Pull Request Command
The /backport commit command and /backport pull request command can be used to quickly create a backport pull request for a given commit. Just navigate to the original commit or pull request in source code hosting provider's web UI and add a comment consisting of /backport <repo> [<branch>]
. If the commit does not apply clean on the target repository then a message will be shown for the files with conflicts.
The pull request will be created from a branch in a shared fork of the target repository. On GitHub, this repository is owned by the openjdk-bots organization. The first time you issue the /backport command for a specific target repository, you will receive an invitation to collaborate in this repository. This invitation needs to be accepted to be able to further update the backport pull request with more changes.
Creating backports
Web UI
...