Skip to content

Commit

Permalink
chore: update manual backport readme and trop comment with `e backpor…
Browse files Browse the repository at this point in the history
…t` command (#272)

* docs: add docs on manual backport in readme and trop comment

* docs: fix link

---------

Co-authored-by: David Sanders <[email protected]>
  • Loading branch information
alicelovescake and dsanders11 authored Mar 25, 2024
1 parent 87d47fd commit d53d154
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion docs/manual-backports.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 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.
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](#build-tools-backport-command).

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

Expand All @@ -23,6 +23,10 @@ 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.

## Build Tools Backport Command

You can use the `e backport <PR>` command to backport PRs. [This command](https://github.com/electron/build-tools?tab=readme-ov-file#e-backport-pr) 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`.
Expand Down
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ export const backportImpl = async (
context.repo({
issue_number: pr.number,
body: `I was unable to backport this PR to "${targetBranch}" cleanly;
you will need to perform this backport manually.`,
you will need to perform this [backport manually](https://github.com/electron/trop/blob/main/docs/manual-backports.md#manual-backports).`,
}),
);

Expand Down

0 comments on commit d53d154

Please sign in to comment.