-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
backporting: Add support for forked cilium repositories #15008
backporting: Add support for forked cilium repositories #15008
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks a lot for making it work!
A few nits below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
39259a9
to
ed69f1a
Compare
Addressed feedback. Once code reviews are in and the lints are green this can be merged without a full CI run. |
Previously, the script assumed `origin` would point to the upstream branch. For users with forked repositories this is not necessarily true, therefore this commit auto-detects the remote name based on the git remote url. Signed-off-by: Sebastian Wicki <sebastian@isovalent.com>
This commit adds a optional positional argument to `get_remote` to allow obtaining the remote of Cilium forks in other organizations than the default `cilium` one. Signed-off-by: Sebastian Wicki <sebastian@isovalent.com>
ed69f1a
to
170cb7a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks all good! Just one more question below.
This adds support for pushing backport PRs from Cilium forks. Because the names of remotes in forked repositories are not standardized, the `submit-backport` script is changed such that it accepts two branch arguments: The upstream remote and the user (fork) remote. The upstream remote is detected using the existing `get_remote` helper, while the user (fork) remote is guessed by checking for a remote matching `github.com/<user>/cilium`. Co-authored-by: Quentin Monnet <quentin@isovalent.com> Signed-off-by: Sebastian Wicki <sebastian@isovalent.com>
Co-authored-by: Quentin Monnet <quentin@isovalent.com> Signed-off-by: Sebastian Wicki <sebastian@isovalent.com>
170cb7a
to
9d7b64c
Compare
I have pushed a simplified version of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again
It adds support for creating backport PRs from Cilium forks. Because
the names of remotes in forked repositories are not standardized, the
submit-backport
script is changed such that it accepts two brancharguments: The upstream remote and the user (fork) remote.
The upstream remote is detected using the existing
get_remote
helper,while the user (fork) remote is guessed by checking for a remote
matching
github.com/<user>/cilium
.This patchset is based on initial work by @qmonnet.