-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Add Contributed backport command #22643
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
zeripath
merged 16 commits into
go-gitea:main
from
zeripath:add-backport-contrib-command
Jan 31, 2023
Merged
Changes from 9 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
cdc926a
Add Contributed backport command
zeripath 42444d3
Merge branch 'main' into add-backport-contrib-command
lafriks c562dca
Update contrib/backport/README
zeripath a391851
fix bug
zeripath 314bdc9
Merge remote-tracking branch 'zeripath/add-backport-contrib-command' …
zeripath 76083f3
local-remote releasebranches
zeripath 2794956
clarify variable names
zeripath 800c1e0
use-yaml.v3
zeripath f58b9b9
minor adjustments
zeripath 99d6bc0
more minor changes
zeripath e03872b
clarify release branch
zeripath 1800dac
more readme changes
zeripath f4bd4ba
no-amend-message instead
zeripath 5d30140
Merge branch 'main' into add-backport-contrib-command
lunny 26f7748
Update contrib/backport/README
zeripath 344908b
Merge branch 'main' into add-backport-contrib-command
zeripath File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
`backport` | ||
========== | ||
|
||
`backport` is a command to help create backports of PRs. It backports a | ||
provided PR from main on to a released version. | ||
|
||
It will create a backport branch, cherry-pick the PR's merge commit, adjust | ||
the commit message and then push this back up to your fork's remote. | ||
|
||
The default version will read from `docs/config.yml`. You can override this | ||
using the option `--version`. | ||
|
||
The upstream branches will be fetched, using the remote `origin`. This can | ||
be overrided using `--upstream`, and fetching can be avoided using | ||
`--no-fetch`. | ||
|
||
By default the branch created will be called `backport-$PR-$VERSION`. You | ||
can override this using the option `--backport-branch`. This branch will | ||
be created from `--release-branch` which is `$(UPSTREAM)/release/$(VERSION)` | ||
delvh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
by default. | ||
|
||
The merge-commit as determined by the github API will be used as the SHA to | ||
cherry-pick. You can override this using `--cherry-pick`. | ||
|
||
The commit will be amended to add the `Backport` header. `--no-amend` can | ||
be set to stop this. | ||
|
||
If cherry-pick is successful the backported branch will be pushed up to your | ||
fork using your remote. These will be determined using `git remote -v`. You | ||
can set your fork name using `--fork-user` and your remote name using | ||
`--remote`. You can avoid pushing using `--no-push`. | ||
|
||
If the push is successful, `xdg-open` will be called to open a backport url. | ||
You can stop this using `--no-xdg-open`. | ||
|
||
Installation | ||
============ | ||
|
||
```bash | ||
go install contrib/backport/backport.go | ||
``` |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.