Skip to content

chore(release): group changelog entries by commit type - #1500

Merged
gabrielseco merged 3 commits into
mainfrom
chore/release-group-changelog
Oct 12, 2026
Merged

gabrielseco merged 3 commits into
mainfrom
chore/release-group-changelog

Conversation

@gabrielseco

@gabrielseco gabrielseco commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

npm run release now groups changelog entries under Features, Fixes, Docs and Chores, in both CHANGELOG.md and 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 release skill unnecessary — npm run release is enough.

What changed

Toggle details
  • generateChangesetContent buckets commits as feat → 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.
  • The release PR is created with execFileSync('gh', [...]) instead of an interpolated shell string, so descriptions with backticks or double quotes (e.g. 1.59.0's "stop stripping the required name field") no longer get mangled or executed by the shell.
  • Parsing, grouping, version bumping and the changelog/PR body formatting moved from release.ts into scripts/release-changelog.ts, because release.ts runs the release on import and can't be loaded by a test. Behaviour is unchanged; the duplicated version-bump arithmetic is now one bumpVersion.
  • scripts/release-changelog.test.ts pins the exact output: section grouping and order, empty sections skipped, version bump (including BREAKING CHANGE), descriptions with backticks/quotes, commits without a PR number, and the PR body footer.
  • scripts/release-hotfix.ts is unchanged.

Screenshots

N/A

Related Resources

  • 1.61.0 #1499 — the 1.61.0 release whose changelog was regrouped by hand

Testing

scripts/release-changelog.test.ts runs in CI, so a regression in the grouping or the notes format fails the build. The gh pr create call 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.

  • Tested against the example/ app in a browser — N/A, script only
  • Feature flag: N/A

🤖 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 release now writes grouped changelog sections (Features, Fixes, Docs, Chores) in both CHANGELOG.md and 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.ts and covered by scripts/release-changelog.test.ts. release.ts delegates to shared helpers (bumpVersion, formatReleaseNotes, formatReleasePrBody) and creates the GitHub PR via execFileSync('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.

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>
@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Deploy preview for remote-flows ready!

Project:remote-flows
Status: ✅  Deploy successful!
Preview URL:https://remote-flows-lxtd0zupx-remotecom.vercel.app
Latest Commit:d7e535a

Deployed with vercel-action

@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Deploy preview for adp-cost-calculator ready!

Project:adp-cost-calculator
Status: ✅  Deploy successful!
Preview URL:https://adp-cost-calculator-6w9qz8r4e-remotecom.vercel.app
Latest Commit:d7e535a

Deployed with vercel-action

@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

📊 Coverage Report

⚪ Coverage unchanged

Metric Current Previous Change Status
Lines 89.49% 89.49% 0% ⚪
Statements 89.37% 89.37% 0% ⚪
Functions 88.37% 88.37% 0% ⚪
Branches 81.13% 81.13% 0% ⚪

Detailed Breakdown

Lines Coverage
  • Covered: 5366 / 5996
  • Coverage: 89.49%
  • Change: 0% (0 lines)
Statements Coverage
  • Covered: 5431 / 6077
  • Coverage: 89.37%
  • Change: 0% (0 statements)
Functions Coverage
  • Covered: 1421 / 1608
  • Coverage: 88.37%
  • Change: 0% (0 functions)
Branches Coverage
  • Covered: 3327 / 4101
  • Coverage: 81.13%
  • Change: 0% (0 branches)

✅ 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>
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>
@gabrielseco
gabrielseco merged commit 919855f into main Oct 12, 2026
12 checks passed
@gabrielseco
gabrielseco deleted the chore/release-group-changelog branch October 12, 2026 08:17
@gabrielseco gabrielseco mentioned this pull request Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants