Skip to content

github: add actions to automate backporting fixes #4162

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kleisauke
Copy link
Member

@kleisauke kleisauke commented Sep 20, 2024

This adds support for automatically cherry-picking fixes for the release branch using a special 'command' in comments:

/cherry-pick <commit1> <commit2> ...

This command attempts to cherry-pick the specified commit(s) to the release branch based on the milestone linked to the issue or pull request. If the commit(s) fail to apply cleanly, then a comment with a link to the failing job will be added to the issue/pull request. If the commit(s) do apply cleanly, the changes will be pushed to a new branch on GitHub, from which a pull request will be created.

Context: #4158 (comment).

Opened as draft as this needs some discussion first. We probably also need to treat release branches as distinct branches after this lands (i.e. the 8.x branches do not need to be merged back into the master branch).

@kleisauke
Copy link
Member Author

Example:
kleisauke#5
kleisauke#6

@lovell
Copy link
Member

lovell commented Sep 20, 2024

I had a quick look to see if any existing Actions might do something similar, but they all appear to merge/rebase an entire PR rather than allow control over specific commits.

(Introducing the use of milestones would be a good improvement regardless.)

@kleisauke
Copy link
Member Author

FWIW, I just found a small issue in this script, which I reported upstream at llvm/llvm-project#109429.

This adds support for automatically cherry-picking fixes for the
release branch using a special 'command' in comments:

/cherry-pick <commit1> <commit2> ...

This command attempts to cherry-pick the specified commit(s) to the
release branch based on the milestone linked to the issue or pull
request. If the commit(s) fail to apply cleanly, then a comment with
a link to the failing job will be added to the issue/pull request.
If the commit(s) do apply cleanly, the changes will be pushed to a
new branch on GitHub, from which a pull request will be created.
@kleisauke
Copy link
Member Author

We probably also need to treat release branches as distinct branches after this lands (i.e. the 8.x branches do not need to be merged back into the master branch).

Another point worth discussing is the process for updating changelog notes for patch versions. Should this be done gradually (e.g. as part of the backport or as a separate commit)? Or all at once as part of the patch release?

FWIW, GLib does the latter (see e.g. commit GNOME/glib@bd40fbb). However, these changes do not seem to be reflected in the main branch (see e.g. https://github.com/GNOME/glib/blob/main/NEWS).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants