Skip to content
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

Add owner flag #297

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions cmd/backport/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ If a commit is provided, `backport` assumes you're running from the repository t

```sh
# Backport K3s change into release-1.21 and release-1.22. Only create the backport issues.
./backport -r k3s -b 'release-1.21,release-1.22' -i 123
./backport -r k3s -o k3s-io -b 'release-1.21,release-1.22' -i 123

# Backport K3s change into release-1.21 and release-1.22. Creates the backport issues and cherry-picks the given commit id.
./backport -r k3s -b 'release-1.21,release-1.22' -i 123 -c '181210f8f9c779c26da1d9b2075bde0127302ee0'
./backport -r k3s -o k3s-io -b 'release-1.21,release-1.22' -i 123 -c '181210f8f9c779c26da1d9b2075bde0127302ee0'

# Backport RKE2 change into release-1.20, release-1.21 and release-1.22
./backport -r rke2 -b 'release-1.20,release-1.21,release-1.22' -i 456 -c 'cd700d9a444df8f03b8ce88cb90261ed1bc49f27'
./backport -r rke2 -o rancher -b 'release-1.20,release-1.21,release-1.22' -i 456 -c 'cd700d9a444df8f03b8ce88cb90261ed1bc49f27'

# Backport K3s change into release-1.21 and release-1.22 and assign to given user.
./backport -r k3s -b 'release-1.21,release-1.22' -i 123 -u susejsmith
./backport -r k3s -o k3s-io -b 'release-1.21,release-1.22' -i 123 -u susejsmith
```

## Contributions
Expand Down
3 changes: 3 additions & 0 deletions cmd/backport/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ var (
issueID uint
branches string
user string
owner string
)

func main() {
Expand All @@ -67,6 +68,7 @@ func main() {
flag.UintVar(&issueID, "i", 0, "")
flag.StringVar(&branches, "b", "", "")
flag.StringVar(&user, "u", "", "")
flag.StringVar(&owner, "o", "", "")
flag.Parse()

if vers {
Expand Down Expand Up @@ -100,6 +102,7 @@ func main() {
IssueID: issueID,
Branches: branches,
User: user,
Owner: owner,
}
issues, err := repository.PerformBackport(ctx, client, &pbo)
if err != nil {
Expand Down