feat: add automated backporting to release branches#796
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds automated backporting of merged main PRs to long-term release/* branches using the sorenlouv/backport toolkit. A label-driven workflow opens backport PRs on merge, a shared .backportrc.json maps backport-to-release/<branch> labels dynamically to target branches, and an internal runbook documents both the label-based and CLI-based flows.
Changes:
- New GitHub Actions workflow that triggers on labeled/closed PRs and runs
sorenlouv/backport-github-action@v12on merge. - New
.backportrc.jsondefining the label→branch regex mapping, PR title template, and target PR labels. - New internal
BACKPORT.mdrunbook plus.mintignoreentries to keep the runbook and config out of the published docs site.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| .github/workflows/backport.yml | Workflow that runs the backport action on merged, labeled PRs. |
| .backportrc.json | Shared backport config: label-to-branch regex mapping and PR title/label settings. |
| .github/BACKPORT.md | Internal runbook for both the label-based workflow and the npx backport CLI. |
| .mintignore | Excludes the runbook and backport config from the published Mintlify site. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
Automated backporting of merged
maincommits to long-termrelease/*branches, delivered as PRs..backportrc.json— shared config for thesorenlouv/backporttoolkit. Abackport-to-release/<branch>label maps dynamically to that branch, so anyrelease/*works with no list to maintain..github/workflows/backport.yml— runssorenlouv/backport-github-action@v12on PR merge and opens a backport PR per labeled branch. A clean cherry-pick opens the PR automatically; a conflict comments on the source PR instead of opening a broken one..github/BACKPORT.md— internal runbook for thenpx backportCLI (batch backports and finishing conflicts), excluded from the published site.Why
Optimization changes merge into
mainand publish immediately, but therelease/*snapshot branches need the same fixes. This turns manual cherry-picking into a one-label action (immediate) or a single CLI pass (batch).Usage
backport-to-release/1.14.x(and any other branch labels) to a PR. On merge, a backport PR opens to each.npx backport, multi-select the merged PRs and target branches.