ci: add cherry-pick to latest release workflow#24051
Conversation
Adds a GitHub Actions workflow that cherry-picks merged PRs to the latest release branch when the 'cherry-pick' label is applied. Also documents both the cherry-pick and backport labels in the contributing guide.
|
Useful automation overall. Having a dedicated path for cherry-picking into just the latest release branch makes sense, and the workflow itself is easy to follow. I found one issue I think should be fixed before merge, plus one operational concern in the workflow implementation.
P1 the docs describe This PR adds
Nit this workflow is not idempotent on re-runs The branch name is deterministic (
|
These are replaced by the automated cherry-pick and backport GitHub Actions workflows.
Matches the idempotency pattern from the backport workflow. Checks for existing PRs (including closed/merged) before creating a new one, preventing duplicates on re-runs.
Documentation CheckUpdates Needed
Already Addressed
Automated review via Coder Tasks |
Adds a GitHub Actions workflow that cherry-picks merged PRs to the latest release branch when the `cherry-pick` label is applied. ## How it works 1. Add the `cherry-pick` label to any PR targeting `main` (before or after merge). 2. On merge (or on label if already merged), the workflow detects the latest `release/*` branch. 3. It cherry-picks the merge commit (`-x -m1`) and opens a PR. This complements the `backport` label (see #24025) which targets the latest **3** release branches. `cherry-pick` targets only the **latest** one — useful for getting fixes into the current release. Created PRs follow existing repo conventions: - **Branch:** `backport/<pr>-to-<version>` - **Title:** `<original PR title> (#<pr>)` — e.g. `fix(site): correct button alignment (#12345)` - **Body:** links back to the original PR and merge commit If the cherry-pick encounters conflicts, the workflow aborts the cherry-pick, creates an empty commit with resolution instructions, and opens the PR with a `[CONFLICT]` prefix so the author can resolve manually. Also: - Removes `scripts/backport-pr.sh` (replaced by this workflow) - Removes `.github/cherry-pick-bot.yml` (old bot config) - Adds a section to the contributing docs explaining the `cherry-pick` label > [!NOTE] > Generated with [Coder Agents](https://coder.com/agents) (cherry picked from commit ab77154)
Adds a GitHub Actions workflow that cherry-picks merged PRs to the latest release branch when the `cherry-pick` label is applied. ## How it works 1. Add the `cherry-pick` label to any PR targeting `main` (before or after merge). 2. On merge (or on label if already merged), the workflow detects the latest `release/*` branch. 3. It cherry-picks the merge commit (`-x -m1`) and opens a PR. This complements the `backport` label (see #24025) which targets the latest **3** release branches. `cherry-pick` targets only the **latest** one — useful for getting fixes into the current release. Created PRs follow existing repo conventions: - **Branch:** `backport/<pr>-to-<version>` - **Title:** `<original PR title> (#<pr>)` — e.g. `fix(site): correct button alignment (#12345)` - **Body:** links back to the original PR and merge commit If the cherry-pick encounters conflicts, the workflow aborts the cherry-pick, creates an empty commit with resolution instructions, and opens the PR with a `[CONFLICT]` prefix so the author can resolve manually. Also: - Removes `scripts/backport-pr.sh` (replaced by this workflow) - Removes `.github/cherry-pick-bot.yml` (old bot config) - Adds a section to the contributing docs explaining the `cherry-pick` label > [!NOTE] > Generated with [Coder Agents](https://coder.com/agents) (cherry picked from commit ab77154)
Adds a GitHub Actions workflow that cherry-picks merged PRs to the latest release branch when the `cherry-pick` label is applied. ## How it works 1. Add the `cherry-pick` label to any PR targeting `main` (before or after merge). 2. On merge (or on label if already merged), the workflow detects the latest `release/*` branch. 3. It cherry-picks the merge commit (`-x -m1`) and opens a PR. This complements the `backport` label (see #24025) which targets the latest **3** release branches. `cherry-pick` targets only the **latest** one — useful for getting fixes into the current release. Created PRs follow existing repo conventions: - **Branch:** `backport/<pr>-to-<version>` - **Title:** `<original PR title> (#<pr>)` — e.g. `fix(site): correct button alignment (#12345)` - **Body:** links back to the original PR and merge commit If the cherry-pick encounters conflicts, the workflow aborts the cherry-pick, creates an empty commit with resolution instructions, and opens the PR with a `[CONFLICT]` prefix so the author can resolve manually. Also: - Removes `scripts/backport-pr.sh` (replaced by this workflow) - Removes `.github/cherry-pick-bot.yml` (old bot config) - Adds a section to the contributing docs explaining the `cherry-pick` label > [!NOTE] > Generated with [Coder Agents](https://coder.com/agents) (cherry picked from commit ab77154)
Adds a GitHub Actions workflow that cherry-picks merged PRs to the latest release branch when the
cherry-picklabel is applied.How it works
cherry-picklabel to any PR targetingmain(before or after merge).release/*branch.-x -m1) and opens a PR.This complements the
backportlabel (see #24025) which targets the latest 3 release branches.cherry-picktargets only the latest one — useful for getting fixes into the current release.Created PRs follow existing repo conventions:
backport/<pr>-to-<version><original PR title> (#<pr>)— e.g.fix(site): correct button alignment (#12345)If the cherry-pick encounters conflicts, the workflow aborts the cherry-pick, creates an empty commit with resolution instructions, and opens the PR with a
[CONFLICT]prefix so the author can resolve manually.Also:
scripts/backport-pr.sh(replaced by this workflow).github/cherry-pick-bot.yml(old bot config)cherry-picklabelNote
Generated with Coder Agents