feat(ci): Backport CI Workflow - #3262
Merged
Merged
Conversation
2 tasks
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## forks/amsterdam #3262 +/- ##
===================================================
+ Coverage 93.42% 93.49% +0.07%
===================================================
Files 625 625
Lines 37032 37032
Branches 3385 3385
===================================================
+ Hits 34597 34623 +26
+ Misses 1666 1653 -13
+ Partials 769 756 -13
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
LouisTsai-Csie
approved these changes
Jul 30, 2026
LouisTsai-Csie
left a comment
Contributor
There was a problem hiding this comment.
When creating this PR, there would be no label an author, please consider:
add_author_as_assignee: true
copy_labels_pattern: '^[AC]-'
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.
Description
Adds a label-driven backport workflow so a merged PR can be cherry-picked onto another long-lived branch automatically (e.g.
benchmarks/amsterdam), without blocking mainline development..github/workflows/backport.yamldoes this:backport <branch>label (e.g.backport benchmarks/amsterdam); the target branch is read from the label itself. PRs without such a label are untouched.pull_request_target(closed,labeled) and gated bymerged == true, so the label can be applied before or after merge but a backport only happens once the PR is actually merged.[backport <branch>] <original title>. On conflict it aborts and comments the manual cherry-pick steps on the source PR — it never force-pushes and never leaves a partially-applied branch behind. Sincebenchmarks/amsterdamis deliberately divergent, conflicts are expected to be common and are handed to a human by design.merge_commits: skipmeans the occasional PR that landed as a merge commit is skipped rather than failing the run; the repo squash-merges, so each PR is a single, cleanly-pickable commit.Operational prerequisites (out of band, not in this PR):
backport benchmarks/amsterdamlabel in the repo. Without a matching label the workflow is a no-op.BACKPORT_TOKENsecret (a PAT or GitHub App token withcontents:write+pull_requests:write). The workflow uses it when present and falls back toGITHUB_TOKENotherwise. This matters because a PR opened with the defaultGITHUB_TOKENcannot trigger downstream CI, so backport PRs to the divergentbenchmarks/amsterdambranch would otherwise land without test runs until re-triggered manually.Usage: add the
backport benchmarks/amsterdamlabel to a PR (e.g.gh pr edit <num> --add-label "backport benchmarks/amsterdam"); on merge the bot opens the backport PR or comments if it cannot apply cleanly.Related Issues or PRs
N/A.
Checklist
just static<type>(<area>): <title>, where<type>and<area>come from an appropriateC-<type>, respectivelyA-<area>, label. The title should match the target squash commit message.Cute Animal Picture