Skip to content

Backport 4.1: Automatic backporting workflow from 4.1 to 4.2#16274

Merged
chrisvest merged 1 commit into4.1from
backport-pr-16273-to-4.1
Feb 13, 2026
Merged

Backport 4.1: Automatic backporting workflow from 4.1 to 4.2#16274
chrisvest merged 1 commit into4.1from
backport-pr-16273-to-4.1

Conversation

@github-actions
Copy link
Copy Markdown

Backport of #16273 to 4.1
Cherry-picked commit: c0c2c27


Motivation:
We often backport PRs from 4.2 to 4.1.
Because these branches are very similar, cherry-picking often applies cleanly.

Modification:
Add a workflow that triggers when a is PRs merged into 4.2 with the needs-cherry-pick-4.1 label, or when a merged PR is labelled with needs-cherry-pick-4.1.
The workflow triggers on pull_request_target so that it runs in the context of the base branch, rather than the PR, which gives it access to repository secrets – this is safe because we're not running any code that's been added or modified by the PR in question.
The workflow checks out the full git history, and tries to cherry-pick the merge commit onto 4.1 and create a pull-request. Finally, the workflow adds a comment to the original PR, linking the backport PR if the cherry-pick succeeded, or reporting failure if it didn't.
The back port branch are pushed back to the netty/netty repository using the same SSH key we use to push release tags.

Result:
Easier to keep 4.1 up to date with bug fixes we do in 4.2.
This PR attempts to fix the issues encountered with #16269 and #16271

Motivation:
We often backport PRs from 4.2 to 4.1.
Because these branches are very similar, cherry-picking often applies
cleanly.

Modification:
Add a workflow that triggers when a is PRs merged into 4.2 with the
`needs-cherry-pick-4.1` label, or when a merged PR is labelled with
`needs-cherry-pick-4.1`.
The workflow triggers on `pull_request_target` so that it runs in the
context of the base branch, rather than the PR, which gives it access to
repository secrets – this is safe because we're not running any code
that's been added or modified by the PR in question.
The workflow checks out the full git history, and tries to cherry-pick
the merge commit onto `4.1` and create a pull-request. Finally, the
workflow adds a comment to the original PR, linking the backport PR if
the cherry-pick succeeded, or reporting failure if it didn't.
The back port branch are pushed back to the netty/netty repository using
the same SSH key we use to push release tags.

Result:
Easier to keep 4.1 up to date with bug fixes we do in 4.2.
This PR attempts to fix the issues encountered with
#16269 and
#16271

(cherry picked from commit c0c2c27)
@normanmaurer
Copy link
Copy Markdown
Member

@chrisvest seems like the CI jobs are not triggered for it ?

@chrisvest
Copy link
Copy Markdown
Member

@normanmaurer Aha, so we need a personal access token after all, for creating the backport PR. When the PR is created with GITHUB_TOKEN, it doesn't trigger other workflows: https://docs.github.com/en/actions/concepts/security/github_token#when-github_token-triggers-workflow-runs

@chrisvest chrisvest disabled auto-merge February 13, 2026 23:22
@chrisvest chrisvest merged commit a80f333 into 4.1 Feb 13, 2026
@chrisvest chrisvest deleted the backport-pr-16273-to-4.1 branch February 13, 2026 23:22
@chrisvest
Copy link
Copy Markdown
Member

Merging this one manually, then.

@chrisvest
Copy link
Copy Markdown
Member

@normanmaurer Hopefully this will fix it: #16276 – unfortunately it means we need to have a personal access token configured, and these things expire.

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