Skip to content

Latest commit

 

History

History
47 lines (31 loc) · 2.13 KB

manual-backports.md

File metadata and controls

47 lines (31 loc) · 2.13 KB

Manual Backports

When trop fails to backport your PR (trust us it tried its best) you need to backport the PR manually. You can do this by cherry-picking the commits in the PR yourself locally and pushing up a new branch or using a build-tools command.

When you create PR for a manual backport, the body of the backport PR must contain:

Backport of #[Original PR Number]

where Original PR Number can be either a smart link:

Backport of #21813

or a full link to the original PR:

Backport of https://github.com/electron/electron/pull/21813

If you raise a PR to a branch that isn't main or a release branch without including a valid reference as above, trop will create a "failed" check on that PR to prevent it being merged.

PRs that are part of a stacked pull request are judged by the branch the whole stack lands on rather than the branch of the PR below them: a stack landing on main is not a backport, while a stack landing on a release branch is validated like any other backport.

A stack is backported as a unit, driven by the target/* labels of its top PR (see usage). When backporting a stack manually, apply the commits of every PR in the stack bottom to top and list each of them in the body of the backport PR, one per line:

Backport of #53876
Backport of #53877
Backport of #53879

Build Tools Backport Command

You can use the e backport <PR> command to backport PRs. This command manually backports PRs by automating the steps above.

Skipping Backport Checks

Sometimes development flows will necessitate a PR train, or several linked PRs to be merged into one another successively where none is a backport. To account for this case, trop allows for a label to be set on the non-backport PR: SKIP_CHECK_LABEL.

You can set this variable as an environment variable with process.env.SKIP_CHECK_LABEL. If no label is set, it will default to 'backport-check-skip'.