-
Notifications
You must be signed in to change notification settings - Fork 304
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
[#290] ci: Add github action to cherry-pick the PR automatically based on label #293
Conversation
Code Coverage Report
|
cherry_pick_branch_0_1: | ||
runs-on: ubuntu-latest | ||
name: Cherry pick into branch_0.1 | ||
if: ${{ contains(github.event.pull_request.labels.*.name, 'branch-0.1') && github.event.pull_request.merged == true }} |
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.
Does GitHub robot support wildcard or multiply branches? I'm afraid that there would be the scenario that we need to back port MRs to many release branches.
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.
It's not worked here to use wildcard, because we need to specify the target branch name anyhow in Line22:
branch: branch-0.1
labels: |
cherry-pick
Also see the docs, if we need to backport to multiple branches, then we need to add specific actions https://github.com/marketplace/actions/github-cherry-pick-action
Besides, IMO I don't like this to be too flexible, which will easily be error-prone.
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.
It would be nice if wildcards were supported.
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.
Sounds reasonable. Another problem, Will we back port all MRs to previous release branches? I see no filter conditions to discharge unnecessary MRs.
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.
Only PRs with label specified will be cherry-picked to different branches. Also, it is cherry-picking, not merge, so only the one commit will be backported.
"need backport" is only for us, not for github action. Github action only checks the label "branch-0.1" |
I see, It's OK for me |
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.
LGTM
…d on label (#293) ### What changes were proposed in this pull request? This PR adds the support of creating a cherry-pick PR against the specified branch based on the label. ### Why are the changes needed? With this, we don't have to manually create a new PR against different branches when we need to do a cherry-pick. Fix: #290 ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Local test.
…d on label (#293) ### What changes were proposed in this pull request? This PR adds the support of creating a cherry-pick PR against the specified branch based on the label. ### Why are the changes needed? With this, we don't have to manually create a new PR against different branches when we need to do a cherry-pick. Fix: #290 ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Local test.
…d on label (#293) ### What changes were proposed in this pull request? This PR adds the support of creating a cherry-pick PR against the specified branch based on the label. ### Why are the changes needed? With this, we don't have to manually create a new PR against different branches when we need to do a cherry-pick. Fix: #290 ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Local test.
What changes were proposed in this pull request?
This PR adds the support of creating a cherry-pick PR against the specified branch based on the label.
Why are the changes needed?
With this, we don't have to manually create a new PR against different branches when we need to do a cherry-pick.
Fix: #290
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Local test.