Repository navigation
fix(v4): per-branch merge methods + PR-ref annotation in release-PR changelogs - #44
Merged
Merged
Conversation
…hangelogs
Two related fixes for the duplicated-commit-line problem in to-master
release PRs.
**1. Ruleset generator now emits per-branch merge methods.**
The pullRequestRule helper accepts a `mergeMethods` array. Builders pass:
- master → ["squash"] (each release lands as one clean commit on
the released line; categorized changelog in
the commit body)
- next → ["rebase"] (feature-PR commits land linearly; GitHub
appends `(#N)` to subjects on merge)
- hotfixes → ["rebase"] (same, for the hotfix lane)
Previously every branch was hard-coded to ["squash"]. With rebase on
next/hotfixes, the to-master release PR no longer has a merge commit AND
the original commit for each feature PR (which is what was producing the
"duplicate line per PR" mess in next/hotfixes git log + changelog).
The generator's `index.html` notes section is updated to describe the new
per-branch policy.
**2. Changelog generator annotates commits with their PR refs.**
generate-comprehensive-changelog now looks up each commit's associated
pull request via `GET /repos/{owner}/{repo}/commits/{sha}/pulls` when the
commit's subject doesn't already carry a `(#N)` reference. The result is
that the to-master release PR's categorized changelog has a PR link for
every commit, regardless of whether the commit came in via rebase-merge
(subject already has `(#N)`) or some other path.
Augmentation is best-effort: API failures or missing owner/repo/token
degrade gracefully to the un-annotated subject. Already-annotated commits
are passed through unchanged so the existing rebase-merge flow incurs no
extra API calls.
The augmentation runs after `filterBotCommits`, so version-bump commits
and other bot-attributed entries are still filtered out and never get a
PR ref looked up.
…lback Two related ruleset-generator fixes following review: **Copilot review belongs on next + hotfixes, not master.** Under the v4 flow, master PRs are release bundles opened by the release-flow workflows from next or hotfixes — every commit in them was already reviewed when it landed there. Code review (human or Copilot) on the release PR adds no signal; the PR review is essentially "approve the version bump and changelog". So the Copilot opt-in now adds the `copilot_code_review` rule to next and hotfixes (where actual code-review PRs land) and not to master. **Allow squash as a fallback on next / hotfixes.** Rebase stays the preferred merge method (listed first → default button selection), so the to-master release-PR changelog still benefits from GitHub's auto-appended `(#N)` refs on commit subjects. But maintainers occasionally want to collapse noisy PR history (lots of "fix typo" / "wip" commits) — leaving squash available as a dropdown choice keeps that escape hatch. index.html notes + checkbox label updated to reflect both changes.
…llNumber CodeQL flagged `if (!sha || !owner || !repo || !token) return null;` as a useless conditional that always evaluates to false. It does — the only caller is augmentCommitsWithPRRefs, which already validates owner/repo/token at the top of the function and skips commits with `if (!sha) continue;` before calling. The inner check is dead code. Removed; replaced with a short comment noting the caller's contract.
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>
Shinrai
added a commit
that referenced
this pull request
Sep 6, 2026
- find-divergence + create-release-pr divergence: use tryGitArgs (execFileSync, no shell) for the tag lookup, consistent with the file's other git calls (args are static; this is for consistency, not a fix). - next-release resolve comment: correct the release-PR close attribution. The reset making next == base is what closes the PR — attributed to the identity that pushed the ref (the bot, per gh-broker #44 closed_by=cldmv-bot[bot]), not a GitHub-native empty-diff close.
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