Repository navigation
chore(release): group changelog entries by commit type - #1500
Merged
Merged
Conversation
feat -> Features, fix -> Fixes, docs -> Docs, everything else -> Chores, in both CHANGELOG.md and the release PR body, so the changelog no longer needs regrouping by hand after npm run release. Create the release PR with execFileSync so descriptions containing backticks or quotes reach gh unmangled instead of being shell-interpolated. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Contributor
|
Deploy preview for remote-flows ready!
Deployed with vercel-action |
Contributor
|
Deploy preview for adp-cost-calculator ready!
Deployed with vercel-action |
Contributor
📊 Coverage Report⚪ Coverage unchanged
Detailed BreakdownLines Coverage
Statements Coverage
Functions Coverage
Branches Coverage
✅ Coverage check passed |
Move commit parsing, grouping, version bumping and the changelog/PR body formatting out of release.ts into release-changelog.ts so they can be unit-tested without running the release (release.ts runs main() on import). Output is unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
jordividaller
approved these changes
Oct 12, 2026
Keep the changelog helpers in scripts/release-changelog.ts and apply main's curly lint rule to them. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Merged
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.
Summary
npm run releasenow groups changelog entries under Features, Fixes, Docs and Chores, in bothCHANGELOG.mdand the release PR description, so the release no longer needs a manual cleanup commit.Why
Every release since 1.58.0 has had its changelog regrouped by hand after the script ran (1.61.0 needed an extra commit on #1499). The grouping is purely by commit type, so the script can do it the same way every time, and the PR description stays in sync for free. That makes a separate
releaseskill unnecessary —npm run releaseis enough.What changed
Toggle details
generateChangesetContentbuckets commits asfeat→ Features,fix→ Fixes,docs→ Docs, anything else (chore,ci,test,refactor, …) → Chores, and emits#### <Section>headings, skipping empty ones. Commit order is kept within each section. The version-bump logic is untouched.execFileSync('gh', [...])instead of an interpolated shell string, so descriptions with backticks or double quotes (e.g. 1.59.0's "stop stripping the requirednamefield") no longer get mangled or executed by the shell.release.tsintoscripts/release-changelog.ts, becauserelease.tsruns the release on import and can't be loaded by a test. Behaviour is unchanged; the duplicated version-bump arithmetic is now onebumpVersion.scripts/release-changelog.test.tspins the exact output: section grouping and order, empty sections skipped, version bump (includingBREAKING CHANGE), descriptions with backticks/quotes, commits without a PR number, and the PR body footer.scripts/release-hotfix.tsis unchanged.Screenshots
N/A
Related Resources
Testing
scripts/release-changelog.test.tsruns in CI, so a regression in the grouping or the notes format fails the build. Thegh pr createcall itself is only exercised by the next real release.Dry run on this branch with the bump confirmed and the release declined (
printf 'Y\nn\n' | npx tsx scripts/release.ts): the printed changelog for 1.61.0 matches the hand-grouped version committed on #1499 line for line, and no files were written.example/app in a browser — N/A, script only🤖 Generated with Claude Code
Note
Low Risk
Release automation and changelog formatting only; no runtime app or auth/data paths change, with behavior locked by new unit tests.
Overview
npm run releasenow writes grouped changelog sections (Features, Fixes, Docs, Chores) in bothCHANGELOG.mdand the release PR body, using conventional commit type and preserving order within each section; empty sections are omitted.Changelog parsing, semver bumping, and note/PR formatting are extracted to
scripts/release-changelog.tsand covered byscripts/release-changelog.test.ts.release.tsdelegates to shared helpers (bumpVersion,formatReleaseNotes,formatReleasePrBody) and creates the GitHub PR viaexecFileSync('gh', …)so commit text with backticks or quotes is not mangled by shell interpolation.Reviewed by Cursor Bugbot for commit d7e535a. Bugbot is set up for automated code reviews on this repo. Configure here.