Skip to content
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

Automate backport merge #84

Open
wants to merge 3 commits into
base: maint-6.6
Choose a base branch
from
Open

Conversation

Vincinator
Copy link
Contributor

@Vincinator Vincinator commented Feb 18, 2025

What this PR does / why we need it:

  • Automatically tries to merge changes in maint-* branches to all rel-* branches specified in .backport-branches file in respective maint-* branch

  • opens PR if merge conflicts occur, so the maintainer can check and fix manually

Which issue(s) this PR fixes:
Fixes #83

Special notes for your reviewer:

* tries to automatically merge from maint-* branches to a specified list of branches defined in .backport-branches file
* if merge conflict occurs, it opens a PR for the maintainer to review
@Vincinator Vincinator changed the base branch from main to maint-6.6 February 18, 2025 12:56
@Vincinator Vincinator marked this pull request as ready for review February 19, 2025 13:51
@Vincinator
Copy link
Contributor Author

Feedback from @pnpavlov: we should open a PR instead of auto merge from maint- to rel- branches.

@Vincinator Vincinator requested a review from fwilhe February 28, 2025 08:09
@fwilhe
Copy link
Member

fwilhe commented Feb 28, 2025

I think this pr makes https://github.com/gardenlinux/package-linux/blob/main/.github/workflows/backport.yml obsolete, that should be deleted as part of this pr

Copy link
Member

@fwilhe fwilhe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good. to be honest I'd have hard time to check if this actually do what it is intended to do, but your tests in the fork look convincing.

on:
push:
branches:
- 'maint-*' # Trigger when any maint-* branch is updated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if this works in our scenario.. I think I had issues with it here https://github.com/gardenlinux/package-linux/blob/main/.github/workflows/backport.yml#L6 but I don't remember all the details. Curious how you tested this.

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just to point out that this is not an oversight: actions/checkout will use the branch that triggered the event, so maint-6.6 in this case, which is what we want, cf https://github.com/actions/checkout?tab=readme-ov-file#usage

not sure if I'd prefer to specify the ref here explicitly, but as far as I am aware this is functionally equivalent

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.

Enable automatic backporting for linux kernel packages
2 participants