Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds a GitHub workflow to create backport PRs when merged PRs have a "backport" label.
This uses the very flexible https://github.com/korthout/backport-action and is based on the workflow used by nixpkgs, which is also used by Stylix. See how it works.
Currently, the workflow will assume our backport labels follow the regex
backport ([^ ]+)$
(e.g.backport nixos-25.05
), however we could customise that by assigning any regex we like towith: label_pattern
.Mergify also has backport support, which we've used a few times via the
@mergifyio backport
command. While we could configure ourmergify.yml
file to look for "backport" labels, IMO it is better to use a GitHub-based solution so that we are not locked into continuing with Mergify indefinitely.This also has the purely aesthetic1 advantage that it'll show as backported by
nixvim-ci[bot]
🤩Footnotes
ok, it's not purely aesthetic. This causes github workflows to be triggered by events caused by the bot. If we used
github-actions[bot]
then no workflow events would trigger. The peter-evans/create-pull-request docs explain this best. ↩