Skip to content

ci: add label-driven backport workflow - #273

Merged
harshtandiya merged 2 commits into
developfrom
claude/backport-mechanism-plan-qs9mg9
Jul 22, 2026
Merged

ci: add label-driven backport workflow#273
harshtandiya merged 2 commits into
developfrom
claude/backport-mechanism-plan-qs9mg9

Conversation

@harshtandiya

Copy link
Copy Markdown
Collaborator

What

Adds .github/workflows/backport.yml, a label-driven GitHub Action (korthout/backport-action) that automates cherry-picking a merged PR onto a maintenance branch.

Why

We just cut 1.0.0. With develop as the forward line and main as the stable v1 line, any v1 fix now has to land in two places. Doing that by hand is easy to forget, so fixes silently miss the release line. This makes the backport one label away.

How it works

  1. Add a backport main label to a PR against develop.
  2. On merge, the action cherry-picks the (squashed) commit onto main and opens a [Backport main] … PR linking back to the original. Normal CI runs on it.
  3. On conflict it does not open a PR — it comments the manual git steps on the original PR so nothing is silently dropped.

The label_pattern: '^backport ([^ ]+)$' scales to future lines (backport <branch>) without editing the workflow.

Follow-ups (not in this PR)

  • Create the labels: backport main (and optionally backport-failed, no-backport).
  • Standardize develop on squash-merge so each backport is one clean cherry-pick.
  • Optional: add develop to the push trigger in ci.yml so the dev line is tested on merge too.

🤖 Generated with Claude Code

https://claude.ai/code/session_013PntNpMSKA2tkugCR3rupb


Generated by Claude Code

Adds a GitHub Action that cherry-picks a merged PR onto a target
maintenance branch when a "backport <branch>" label is present
(e.g. "backport main" to carry a fix from develop back to the v1
line). On conflict it comments the manual steps instead of opening
a PR, so nothing is silently dropped.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PntNpMSKA2tkugCR3rupb
@greptile-apps

greptile-appsBot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds automated, label-driven backports for merged pull requests. The main changes are:

  • A workflow for creating backport pull requests against maintenance branches.
  • Support for triggering backports during merge or by adding a label later.
  • Conflict guidance and label copying for generated pull requests.
  • An immutable pin for the write-capable third-party action.
  • Filtering that prevents backport labels from propagating to generated pull requests.

Confidence Score: 5/5

This looks safe to merge.

  • The action now uses an immutable commit pin.
  • Generated pull requests no longer inherit labels that would trigger another backport.
  • No blocking issue was confirmed in the updated workflow.

Important Files Changed

FilenameOverview
.github/workflows/backport.ymlAdds the backport workflow, pins its external action, and excludes backport-control labels from generated pull requests.

Reviews (2): Last reviewed commit: "ci: harden backport workflow" | Re-trigger Greptile

Comment thread.github/workflows/backport.yml Outdated
Comment thread.github/workflows/backport.yml Outdated
- Pin korthout/backport-action to a commit SHA (v3.4.1) instead of the
mutable v3 tag, since the pull_request_target job holds write access.
- Exclude the "backport <branch>" label when copying labels so a merged
backport PR doesn't re-trigger the workflow.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PntNpMSKA2tkugCR3rupb
@harshtandiya
harshtandiya merged commit a08b6c7 into developJul 22, 2026
8 checks passed
@harshtandiya
harshtandiya deleted the claude/backport-mechanism-plan-qs9mg9 branch July 22, 2026 13:45
harshtandiya added a commit that referenced this pull request Jul 29, 2026
Brings main to parity with develop at a4f52b2: the buzz/api domain package
split (#295-#303), the shared bench setup action (#305), and the backport
workflow (#273, #291). Tree is identical to develop at a4f52b2.
harshtandiya added a commit that referenced this pull request Jul 29, 2026
Brings main to parity with develop at a4f52b2: the buzz/api domain package
split (#295-#303), the shared bench setup action (#305), and the backport
workflow (#273, #291). Tree is identical to develop at a4f52b2.
Sign up for freeto 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

@harshtandiya@claude