Welcome! We're glad you want to try out trop
.
trop
automates backporting PRs to versioned release branches.
Automatically With Labels:
- Open a bugfix or feature pull request to
main
- Add backport label(s) to the pull request (ex.
target/2-0-x
) - Your pull request is reviewed and you or a co-contributor merges it into
main
trop
will automatically open pull requests containingcherry-pick
s of the code into the backporting branches you specified in your labels (in this case,2-0-x
).- You or a co-contributor resolves any conflicts and merges in
trop
's backports
NOTE: If trop
fails to perform a backport, it will flag the original PR with needs-manual-backport/2-0-x
so that you or another contributor and perform the backport manually. Trop will keep track of manual backports
and update the labels appropriately.
Manual Triggering With Labels:
- Open a bugfix or feature pull request to
main
- Your pull request is reviewed and you or a co-contributor merges it into
main
- After it's been merged, you add backport label(s) to the pull request (ex.
target/2-0-x
) - You create a new comment with the following body:
/trop run backport
trop
will begin the backport process for target branches you have specified via labelstrop
will automatically open pull requests containingcherry-pick
s of the code into the backporting branches you specified in your labels (in this case,2-0-x
).- You or a co-contributor resolves any conflicts and merges in
trop
's backports
Manual Triggering Without Labels:
- Open a bugfix or feature pull request to
main
- Your pull request is reviewed and you or a co-contributor merges it into
main
- You create a new comment with the following body:
/trop run backport-to [BRANCH_NAME]
, where[BRANCH_NAME]
is replaced with the branch you wish to backport to trop
will begin the backport process for target branch you manually specifiedtrop
will automatically open pull requests containingcherry-pick
s of the code into the branch you specified in your comment body- You or a co-contributor resolves any conflicts and merges in the backport pull request
trop
created
Note
- You can delete the original PR branch whenever you want - trop does not need the original branch to perform the backport.
trop
is configured by default to use variable specific to electron, so in order to get the best experience you should be sure to set the following:
BOT_USER_NAME
- the username if your bot (e.gtrop[bot]
)SKIP_CHECK_LABEL
- see skipping manual backportsNUM_SUPPORTED_VERSIONS
- automatic backports to stable branches further than this many back will be skipped. Defaults to 3.NO_EOL_SUPPORT
- if set to1
, manual backports to stable branches older thanNUM_SUPPORTED_VERSIONS
will also be disallowed.SUPPORTED_BRANCH_PATTERN
- regex to define what a "stable branch" is. Defaults to^(\d+)-(?:(\d+)-x|x-y)$
, which matches branches like8-x-y
or5-1-x
. Regex groups will be used for sorting, to determine which branch is "older" than another. Numeric groups (matching/^\d+$/
) will be compared numerically, otherwise groups will be compared lexically. The first group is treated as the major version. There must be at least one group.