Skip to content

feat(ci): Backport CI Workflow - #3262

Merged
marioevz merged 3 commits into
ethereum:forks/amsterdamfrom
marioevz:backport-bot
Jul 30, 2026
Merged

feat(ci): Backport CI Workflow#3262
marioevz merged 3 commits into
ethereum:forks/amsterdamfrom
marioevz:backport-bot

Conversation

@marioevz

Copy link
Copy Markdown
Member

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.yaml does this:

  • Selective, via a label. The workflow acts only on PRs carrying a backport <branch> label (e.g. backport benchmarks/amsterdam); the target branch is read from the label itself. PRs without such a label are untouched.
  • Fires on merge. Triggered on pull_request_target (closed, labeled) and gated by merged == true, so the label can be applied before or after merge but a backport only happens once the PR is actually merged.
  • Fails safe on conflict. On a clean cherry-pick it opens a PR against the target branch titled [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. Since benchmarks/amsterdam is deliberately divergent, conflicts are expected to be common and are handed to a human by design.
  • Skips non-squash merges. merge_commits: skip means 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):

  • Create the backport benchmarks/amsterdam label in the repo. Without a matching label the workflow is a no-op.
  • Optionally add a BACKPORT_TOKEN secret (a PAT or GitHub App token with contents:write + pull_requests:write). The workflow uses it when present and falls back to GITHUB_TOKEN otherwise. This matters because a PR opened with the default GITHUB_TOKEN cannot trigger downstream CI, so backport PRs to the divergent benchmarks/amsterdam branch would otherwise land without test runs until re-triggered manually.

Usage: add the backport benchmarks/amsterdam label 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

  • Ran fast static checks to avoid CI fails, see Code Standards & Verifying Changes: just static
  • PR title has the form <type>(<area>): <title>, where <type> and <area> come from an appropriate C-<type>, respectively A-<area>, label. The title should match the target squash commit message.

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

@codecov

codecov Bot commented Jul 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.49%. Comparing base (3ae3d66) to head (6262198).
⚠️ Report is 11 commits behind head on forks/amsterdam.

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     
Flag Coverage Δ
unittests 93.49% <ø> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@LouisTsai-Csie LouisTsai-Csie left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

When creating this PR, there would be no label an author, please consider:

add_author_as_assignee: true
copy_labels_pattern: '^[AC]-'

Comment thread .github/workflows/backport.yaml Outdated
Comment thread .github/workflows/backport.yaml Outdated
@marioevz
marioevz merged commit dfb1576 into ethereum:forks/amsterdam Jul 30, 2026
15 checks passed
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