-
Notifications
You must be signed in to change notification settings - Fork 153
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
ci: Create backport pr based on milestone. #1876
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.
Sion has tested most functionalities in his test repo.
Let's merge this and see if it goes well.
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.
Sion has tested most functionalities in his test repo.
Let's merge this and see if it goes well.
Backport to 24.09 is failed. Please backport manually. |
This repository manages a few release branches where latest bug fixes and minor improvements are backported and released as a series of prior versions.
(e.g., The main branch targets 24.09, while fixes are backported to 24.03 and 23.09 and shipped as their patch releases.)
So far, we have created the backport commits by manually
git cherry-pick
, adding several git trailers likeBackported-from: main (24.09)
,Backported-to: 24.03
.In this PR, we are going to let GitHub Actions auto-generate the backport PRs. The target branches are calculated from the original PR's milestone property. Compared to individual cherry-picked commits, it has the following advantages:
Sometimes
git cherry-pick
may fail due to merge conflicts. In such case, the GitHub Actions workflow will append a comment to the original PR indicating that a human developer should take care of manual cherry-picking.The workflow also automatically combines the git trailers including those already existing in the original PR's merge commit, those added by GitHub (e.g.,
Co-authored-by
), and our own backport trackers (e.g.,Backported-from
,Backported-to
, and a newBackport-of
field).The result backport PR is composed like the followings:
{original-merge-commit-header} (#{backport-PR-number})
For example, if the original PR's merge commit has the headline:
"fix: A bug (#123)"
, the backport PRs will have the titles like"fix: A bug (#123) (#124)"
."This is an auto-generated backport PR of #{original-PR-number} to the {target-milestone} release."