From 5238d76b885ec12782455b019eec8e16b88731d2 Mon Sep 17 00:00:00 2001 From: void <1711810+taraxvoid@users.noreply.github.com> Date: Sun, 11 Oct 2026 22:10:03 -0700 Subject: [PATCH] fix(release): auto-merge back-merge PRs with a merge commit The back-merge job opened the main to next PR but left the merge method to whoever clicked the button, and next allows squash for feature PRs. v0.12.0 through v0.12.4 were all squashed, so main's commits never became ancestors of next and every later back-merge re-conflicted on the same lines. Enable auto-merge with --merge so the method is pinned in code. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/release-please.yml | 11 ++++++++--- RELEASING.md | 5 ++++- bun.lock | 3 +++ 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 2579f44..892ccbb 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -286,8 +286,8 @@ jobs: # Stable releases only: bring the release's version bump and changelog from # main into next so the branches do not drift. Only version bookkeeping files # may conflict and scripts/back-merge.ts resolves those; anything else fails - # the job loudly so a person resolves it (see RELEASING.md). The PR must be - # merged with a merge commit, not squashed. + # the job loudly so a person resolves it (see RELEASING.md). The PR is set to + # auto-merge with a merge commit, never a squash, so the branches share history. back-merge: name: Open main to next back-merge PR needs: [channel, release-please] @@ -347,6 +347,11 @@ jobs: else gh pr create --repo "$GITHUB_REPOSITORY" --base next --head "$BRANCH" \ --title "chore: back-merge ${TAG} into next" \ - --body "Brings the ${TAG} version bump and changelog from main into next. Merge with a merge commit, not a squash, so the branches share history." + --body "Brings the ${TAG} version bump and changelog from main into next. Auto-merges with a merge commit once checks pass; do not squash it, or main's commits never become ancestors of next and the next back-merge conflicts on the same lines again." fi + # The next ruleset allows squash for feature PRs, so a person clicking + # merge here would default to squash (v0.12.0 to v0.12.4 all were). + # Auto-merge pins the method to a real merge commit. + gh pr merge "$BRANCH" --repo "$GITHUB_REPOSITORY" --auto --merge + diff --git a/RELEASING.md b/RELEASING.md index 1fcc860..62a92cc 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -40,7 +40,10 @@ gitGraph 3. release-please opens or updates the stable release PR on `main`. Merging it publishes under `latest`, moves the floating `v0` tag, and opens a `main` to `next` back-merge PR. -4. Merge the back-merge PR with a merge commit too. +4. The back-merge PR auto-merges with a merge commit once checks pass. If you + ever merge one by hand (e.g. after resolving conflicts), use a merge commit, + never squash: a squash leaves main's commits out of next's history, so the + following back-merge conflicts on the same lines again. ## Hotfix diff --git a/bun.lock b/bun.lock index 78a63aa..d490979 100644 --- a/bun.lock +++ b/bun.lock @@ -14,6 +14,9 @@ "peerDependencies": { "@playwright/test": ">=1.40", }, + "optionalPeers": [ + "@playwright/test", + ], }, }, "packages": {