-
-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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 backporting action #124273
Add backporting action #124273
Conversation
If "backport <branch>" label is applied to a PR, once the PR is merged, github-actions bot will create another PR targeting <branch> and cherry-picking commits.
What about here? |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/automating-pr-backports/12565/2 |
Note we also have the |
We could have |
I would rather have explicit branch targets. Less likely to have issues with EOL windows (where there's two "supported stable releases); and less reliance on someone (probably a release manager) remembering to update what's referenced by old / new, and then communicating that to entire community. EDIT: english... my only weakness. EDIT EDIT: Also, explicit branch targets may allow for edge cases like backporting something to an EOL release (e.g. critical CVEs such as the recent bash vulnerability). |
Co-authored-by: zowoq <59103226+zowoq@users.noreply.github.com>
Great, it even does the |
We have backport documentation in |
The action doesn't yet support customizable label naming so for now we'll have to live with some duplication in labels. |
Co-authored-by: zowoq <59103226+zowoq@users.noreply.github.com>
I think we should wait with merging this until upstream allows for configurable branch names, personally. It seems like they are very responsive in the linked issue, so this shouldn't take too long it seems. |
I think this feature is so important that we should not wait. What happened now often is that backport PR's are opened before the original is merged. |
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.
Assuming it is tested this looks good to me.
I also don't see why this should block us. |
@domenkozar Do you want to be a codeowner for this workflow? |
If we merge it now and change the label names later, that will create a big problem for existing PRs. |
Why? Labels can be renamed. Also, if we have two labels for the same branch we drop one of them and replace them by the other. |
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.
Oh, I didn't know a global label rename was possible. In that case, LGTM
Will this action also work for PRs to the staging branch? |
I don't see a reason you couldn't do |
There seems to be a permissions problem with the action. |
@domenkozar It seems the action does not have permissions to push to your repo
The action also does not have permissions to comment or open pull requests:
|
We'll have to use |
This also doesn't work for rebased (or probably squashed) commits either. https://github.com/NixOS/nixpkgs/runs/2671807530?check_suite_focus=true |
I've opened an issue for this topic korthout/backport-action#46 |
Opened #124760 for the permissions fix! |
We may want to automate cleanup of the Using a bot user would also mean actions aren't bypassed in the backport PRs (eg. |
If
backport <branch>
label is applied to a PR,once the PR is merged, github-actions bot will create another PR targeting
and cherry-picking commits.
example
It takes a couple of minutes to fetch full history and all branches when backporting.
Once this PR is merged I'll create
backport release-21.05
label.Where do I document this workflow for maintainers?