Repository navigation
fix(v4): prefer "Create a merge commit" on next/hotfixes; dedupe stacked-PR commits - #47
Merged
Merged
Conversation
…ked-PR commits
**Two related fixes — same root cause: signatures.**
GitHub's "Rebase and merge" web-UI button re-creates the PR's commits
server-side and strips their GPG signatures. Every rebased commit lands on
the target unsigned, even when the source PR's commits were all signed.
This is a documented GitHub limitation; there's no setting to make
rebase-merge preserve signatures.
To keep signed commits on `next`/`hotfixes`, only "Create a merge commit"
is allowed there now. It keeps the PR's original commits intact (signatures
preserved) and adds a single merge commit on top. master stays squash —
each release still lands as one clean signed commit.
**Ruleset generator** (`docs/tools/ruleset-generator/`):
- `buildNext` / `buildHotfix`: `mergeMethods` → `["merge"]` (was `["rebase", "squash"]`).
- Comments + index.html notes explain why and call out the signature-strip
behavior so a maintainer who sees a "Rebase and merge" button in some
consumer repo with looser settings knows to avoid it.
**Changelog generator dedup** (`.github/actions/git/steps/generate-comprehensive-changelog/action.mjs`):
With merge commits, a stacked PR's source branch contains the earlier
PR's commits via the original SHAs. The `base..head` range then includes
them in the rendered changelog even though they're already on the target
(via the earlier PR's merge commit). Patch-id-based dedup via `git cherry`
identifies those duplicates and drops them from the body:
filterAlreadyAppliedByPatchId(commits, "base..head")
runs `git cherry <base> <head>`, parses `-` lines (patch already on
base), filters those SHAs out of the commits array.
The release-to-master changelog (master..next range) is unaffected: master
has no equivalent patches for commits between releases, so `git cherry`
marks everything as `+` and the dedup is a no-op there.
**Out-of-scope for this commit but documented elsewhere:** the existing 3
unsigned commits on `next` (from the earlier rebase-merge experiment) are
historical artifacts. They'll be absorbed into the next master squash —
the resulting release commit on master is signed, so the published line
is clean. If we want to force-fix `next` itself, that's a separate
admin-bypass force-push operation, not part of this code change.
Shinrai
force-pushed
the
fix/v4-prefer-merge-and-dedupe
branch
from
May 26, 2026 21:00
e0a1200 to
c552494
Compare
Shinrai
added a commit
that referenced
this pull request
May 26, 2026
…#40) ## 🚀 What's Changed ### 💥 Breaking Changes _No breaking changes_ ### ✨ Features - #41 (5fb9ffb) - feat(redirect-hotfix-pr): redirect Dependabot security PRs to the hotfix lane (c4e4c89) ### 🐛 Bug Fixes - #48 (7d06c21) - fix(changelog): drop merge commits from release-PR changelog (7ccdfde) - #47 (ff4207b) - fix(v4): prefer "Create a merge commit" on next/hotfixes; dedupe stacked-PR commits (c552494) - #44 - fix(v4): per-branch merge methods + PR-ref annotation in release-PR changelogs (29637d7) - fix(rulesets): move Copilot review next/hotfixes; allow squash as fallback (26dcea8) - fix(changelog): drop redundant precondition check in findAssociatedPullNumber (ea01889) - #41 (5fb9ffb) - Potential fix for pull request finding 'CodeQL / Missing regular expression anchor' (329f7fe) - #39 (91ddf1f) - fix(cla): audit tool walks both default and override signature trees (84ecbed) - fix(cla): pass public_cla_url_template through reusable workflow; document override behavior (97bb8d2) - fix(cla): bot reads CLA from ledger (default) or consumer override; per-text-hash scope (132bcb7) - fix(cla): remove root CLA.md; bot must use the central ledger as source (f01b007) ### 🔧 Other Changes - #46 (454b724) - docs(readme): modernize for v4; drop stale v3-launch markers; fix ruleset-generator links (d09fdb8) - #43 (417f110) - docs(embedded-tests): surface the embedded-tests-ci feature in onboarding (27a82f6) - #42 (47a9ee4) - chore(dependabot): add v4-tuned dependabot.yml template + update auto-merge wiring (d52b60e) - #39 (91ddf1f) - docs(cla): describe override scope across all onboarding + reference docs (7a25d06) - #38 (9527fef) - docs(cla): reframe public sample CLA, drop mirror-of-private framing (549263a) - chore(cla): seed real CLA text + add boilerplate files (730a90e) <details> <summary>👥 Contributors</summary> - @Shinrai </details> --------- Co-authored-by: Nate Corcoran <[email protected]> Co-authored-by: cldmv-bot[bot] <230771808+cldmv-bot[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🚀 What's Changed
💥 Breaking Changes
No breaking changes
✨ Features
No new features
🐛 Bug Fixes
🔧 Other Changes
No other changes
👥 Contributors