You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It should contain one entry per fix/change merged to develop since the last production release (v1.0.0). The corresponding v1.0.1-dev.1 prerelease on develop got it right:
The v1.0.0 release got this right too — the merge commit for promotion PR #67 was 63f5b26 Merge pull request #67 from point-source/develop (a true merge), and semantic-release walked into the second parent and listed each squash from develop.
Root cause
Promotion PR #74 was squash-merged instead of merge-committed. Its mergeCommit is bedf3cd fix: promote develop → main (#74) — a single squash with all develop commits collapsed into the body. semantic-release on main only sees that one commit since v1.0.0, parses its title (fix: promote ...), and emits one Bug Fixes entry.
This happens because two flows both call enableAutoMerge on the same promotion PR with conflicting methods, and the later one wins:
src/promotion.ts:108 (push-flow path) — opens the promotion PR and sets method: MergeMethod = \"MERGE\". Comment on that line is explicit:
// Promotion PRs always use a true merge commit. Squash on this edge severs// ancestry between source and target — see docs/squash-merge-issues.md.constmethod: MergeMethod= \"MERGE\";
src/pr-flow.ts:140 (pull_request event path) — runs on every pull_request event for any managed PR. It has no notion of "promotion PR" and hardcodes:
// Feature PRs into stream branches always squash so each PR contributes// exactly one CHANGELOG entry...constmethod: MergeMethod= \"SQUASH\";
constresult=awaitgh.enableAutoMerge(pr.nodeId,method);
For PR fix: promote develop → main #74 (fix: promote develop → main, base main), fix is in main.auto_merge, so it hits the eligible branch and re-enables auto-merge with SQUASH. The final auto-merge method registered on the PR is whatever the last call set, so SQUASH wins on any pull_request event after the initial open.
Reproduction
Last production release: v1.0.0 at 4d86696 (back-merge tip on main).
Promotion PR fix: promote develop → main #74 was opened by push-flow, then squash-merged. Resulting commit bedf3cd is the only post-v1.0.0 commit on main, so the v1.0.1 changelog has exactly one bullet.
Suggested fix
In src/pr-flow.ts, detect promotion PRs and skip the merge-method override (or switch the method to MERGE for that case). A promotion PR is identifiable by:
head is one of the configured stream branches AND base is the next branch in that stream's chain, AND
title matches the ^[a-z]+(\\([^)]+\\))?!?: promote <source> → <target>$ shape already encoded at src/promotion.ts:234.
Either centralize the "is this a promotion PR" check or have pr-flow short-circuit when the head/base pair matches a stream's promotion edge. promotion.ts already uses MergeMethod = \"MERGE\" correctly; the gap is purely that pr-flow stomps on it.
Test coverage to add
A test in tests/pr-flow.test.ts that asserts: when the PR's head/base match a stream's promotion edge, enableAutoMerge is either not called by pr-flow, or is called with \"MERGE\". The current suite has no such case, which is why this regressed silently.
Impact / mitigation
Affects every production release after a promotion. The dev changelog stays correct (the squash on main happens after the dev release is cut), so adopters reading v*.dev.N notes are fine, but the user-facing v* release on main loses fidelity.
Workaround until fixed: manually merge the promotion PR via the GitHub UI with "Create a merge commit" instead of letting auto-merge run, OR remove fix / feat / etc. from main.auto_merge in .flywheel.yml so pr-flow takes the needs-review path on promotion PRs. Both are unsatisfying.
Symptom
The v1.0.1 release on
maincontains a single changelog entry:It should contain one entry per fix/change merged to develop since the last production release (v1.0.0). The corresponding
v1.0.1-dev.1prerelease on develop got it right:The v1.0.0 release got this right too — the merge commit for promotion PR #67 was
63f5b26 Merge pull request #67 from point-source/develop(a true merge), and semantic-release walked into the second parent and listed each squash from develop.Root cause
Promotion PR #74 was squash-merged instead of merge-committed. Its
mergeCommitisbedf3cd fix: promote develop → main (#74)— a single squash with all develop commits collapsed into the body. semantic-release on main only sees that one commit sincev1.0.0, parses its title (fix: promote ...), and emits one Bug Fixes entry.This happens because two flows both call
enableAutoMergeon the same promotion PR with conflicting methods, and the later one wins:src/promotion.ts:108(push-flow path) — opens the promotion PR and setsmethod: MergeMethod = \"MERGE\". Comment on that line is explicit:src/pr-flow.ts:140(pull_request event path) — runs on everypull_requestevent for any managed PR. It has no notion of "promotion PR" and hardcodes:For PR fix: promote develop → main #74 (
fix: promote develop → main, basemain),fixis inmain.auto_merge, so it hits the eligible branch and re-enables auto-merge withSQUASH. The final auto-merge method registered on the PR is whatever the last call set, soSQUASHwins on anypull_requestevent after the initial open.Reproduction
v1.0.0at4d86696(back-merge tip on main).92d39e6).bedf3cdis the only post-v1.0.0 commit on main, so the v1.0.1 changelog has exactly one bullet.Suggested fix
In
src/pr-flow.ts, detect promotion PRs and skip the merge-method override (or switch the method toMERGEfor that case). A promotion PR is identifiable by:^[a-z]+(\\([^)]+\\))?!?: promote <source> → <target>$shape already encoded atsrc/promotion.ts:234.Either centralize the "is this a promotion PR" check or have pr-flow short-circuit when the head/base pair matches a stream's promotion edge. promotion.ts already uses
MergeMethod = \"MERGE\"correctly; the gap is purely that pr-flow stomps on it.Test coverage to add
A test in
tests/pr-flow.test.tsthat asserts: when the PR's head/base match a stream's promotion edge,enableAutoMergeis either not called by pr-flow, or is called with\"MERGE\". The current suite has no such case, which is why this regressed silently.Impact / mitigation
v*.dev.Nnotes are fine, but the user-facingv*release on main loses fidelity.fix/feat/ etc. frommain.auto_mergein.flywheel.ymlso pr-flow takes the needs-review path on promotion PRs. Both are unsatisfying.