-
Notifications
You must be signed in to change notification settings - Fork 252
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
Backport script #1280
Backport script #1280
Conversation
This reverts commit a5f3428. This workflow doesn't work with mandatory commit signing. Signed-off-by: Lann Martin <[email protected]>
This script semi-automates the process of backporting a PR from one branch to another. Ex: `gh-backport.sh 123 v1.0` Signed-off-by: Lann Martin <[email protected]>
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.
This worked well for me (#1284)! Though, I needed to do some setup (as a first time gh
-user). Wonder if any/all of these should go in as script comments or a doc somewhere?
I needed:
gh auth login
gh repo set-default fermyon/spin
- and I selected 'Create a fork of fermyon/spin' as the answer to the
? Where should we push the 'backport-1269-to-v1.0' branch?
question (somewhat unintuitively; I already had a fork and indeed it just used vdice/spin).
Yeah, this is definitely Minimum Viable Script here. I might turn it into a gh extension which I just learned exists: https://cli.github.com/manual/gh_extension |
Oh, I didn't realise it depended on the user setting a default repo. (I didn't even know default repo was a thing.) Can't we just script it to use the Spin repo? |
can we use this script from within the Github actions? e.g. a workflow that run this script on a specific comment on the PR? |
The issue with doing this in a workflow is signing commits, just like the 3rd party action we tried. |
I'm going to merge since it seems to work. PRs welcome 🙂 |
Also revert the workflow that doesn't work.
Usage:
.github/gh-backport.sh <PR #> <branch>
e.g.
(which created #1281)