From 30f98e8c43f6c62e9a6d28ebaacff8e121a9de2b Mon Sep 17 00:00:00 2001 From: hokiepokedad2 <38219945+hokiepokedad2@users.noreply.github.com> Date: Wed, 5 Aug 2026 11:37:26 -0400 Subject: [PATCH] ci: drop --delete-branch from the changelog auto-merge The v2.12.0 release cut failed at "Enable auto-merge": X Cannot use `-d` or `--delete-branch` when merge queue enabled `main` gained a merge queue in #378/#379, and gh rejects the flag outright rather than ignoring it, so the step exited 1 and the whole workflow failed. The changelog PR itself was created and approved fine -- only the arming failed. The flag was redundant regardless: peter-evans/create-pull-request above already sets `delete-branch: true`, which removes the branch once the PR closes. --squash is kept even though the queue now dictates the merge strategy (gh warns about it) so the intent still reads correctly if the queue is ever removed. --- .github/workflows/release-changelog.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-changelog.yml b/.github/workflows/release-changelog.yml index b58a5c86..823173ef 100644 --- a/.github/workflows/release-changelog.yml +++ b/.github/workflows/release-changelog.yml @@ -159,10 +159,18 @@ jobs: --body "Automated changelog cut — approving the mechanical [Unreleased] → version promotion. Source entries were already reviewed on their own PRs." # Squash-merge once the required checks pass (they run because the PR is app-authored). + # + # No --delete-branch: `main` uses a merge queue, and gh rejects the flag outright with + # "Cannot use `-d` or `--delete-branch` when merge queue enabled", failing the whole step. + # It was redundant anyway -- create-pull-request above already sets `delete-branch: true`, + # which removes the branch once the PR closes. + # + # --squash is likewise decorative now (gh warns "the merge strategy for main is set by the + # merge queue") but is kept so the intent still reads correctly if the queue is ever removed. - name: Enable auto-merge if: steps.cfg.outputs.has_app == 'true' && steps.cpr.outputs.pull-request-number env: GH_TOKEN: ${{ steps.app-token.outputs.token }} PR: ${{ steps.cpr.outputs.pull-request-number }} run: | - gh pr merge "$PR" --squash --auto --delete-branch + gh pr merge "$PR" --squash --auto