ci(release): grouped, linked changelog in the auto-created release PR body - #4525
Conversation
The auto-created release PR body was a generic one-liner. Add scripts/release-changelog.js, which builds a changelog from `git log <last tag>..HEAD`, groups commits by conventional-commit type (feat/fix/perf/…), and links every #NNN and Closes/Fixes #NNN reference to the repository's issues. create-release-pr.yml now appends it to the PR body on create and refreshes it on later pushes. Dependency-light: git + string parsing only. Covered by the release automation suite.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
…ions - Pick the previous release tag from the active lane (previous alpha for an alpha PR) instead of the graph-nearest tag, so a stable tag merged into alpha no longer skews the range. - Drop the '|| echo ""' fallback so a generation failure aborts the step rather than blanking an existing PR's changelog. - Render '@'-prefixed Less variable names (e.g. @block1) as &less#64; so they don't become GitHub @-mentions.
What this does
The
Create Release PRworkflow auto-opens achore: release vX.Y.Z-alpha.NPR whenever code lands onalpha(ormaster). Until now its body was a single generic line. This makes that body carry a real changelog of everything new since the previous release.The body now shows, grouped by conventional-commit type (feat / fix / perf / refactor / docs / test / build / ci / chore / other):
#NNNandCloses/Fixes #NNNfrom the commit body are both linked to the repo's issues.How
scripts/release-changelog.jsreadsgit log <last tag>..HEAD, classifies each commit, drops the release bump commit itself, and renders grouped Markdown with linked references. Dependency-light on purpose —git+ string parsing, no semantic-release.create-release-pr.ymlcomposes the body as the existing preamble + this changelog. It sets the body on PR creation and refreshes it withgh pr editon subsequent pushes, so the changelog stays current as commits land on the release branch.X.Y.Z-alpha.N; master → newest non-prerelease), so a stable tag merged intoalphanever skews the "since last alpha" range. Links useGITHUB_REPOSITORY.@-prefixed Less variable names in subjects (e.g.@block1) are emitted as the@entity so they render as literal text, not GitHub @-mentions.set -e) rather than replacing an existing PR body with an empty changelog.Sample output
Generated locally with
node scripts/release-changelog.js v5.0.0-alpha.1 v5.0.0-alpha.3:Changes since v5.0.0-alpha.1
Features
870f1f2dless5: experimental dev browser bundle (dist/less-browser-dev.js)Bug Fixes
bb0b7de7less5: strictUnits: false means the default (preserve); every use warns7ed6ec4eless5: support unitMode; strictUnits is a deprecated alias, not unsupportedc1e45e5dless5: browser bundle exposes window.less with 4.x-compatible renderf18cc429release: drop redundant post-tag-push origin/master fetchb84b6dferelease: drop behind-master gate blocking alpha publishesTests
16b2f1c7units: no-strict expects calc() under Less 5; add explicit unitMode loose fixtured6ac8c60v5: graduate mixins-guards to §4.1 string ground and §4.2 trichotomy68987c90v5: graduate unit-algebra fixtures to §4.7 preserved spellingChores
1519dca3less5: pin Jess 2.0.0-alpha.16; incompatible-unit math renders as calc()93a26158less5: V18 preserve follow-ups — fixture, expected-failure, default wordinge25737e0less5: rename browser-v5 -> browser-dev6929c47balpha: bump Jess stack to 2.0.0-alpha.15, drop parseman pinOther Changes
bd2d25d2test-data(units): no-strict golden is loose, not preserve04a15d6ctest-data(functions): rename invalid @1 detached-ruleset var to @block1e7626e8ctest-data(url-args): graduate to v5 — preserve authored newline+indent in multi-line src value7d07c112Less 5 alpha.1: Jess-powered compiler preview (#19)Reference-linking (from the last real range,
v5.0.0-alpha.3..v5.0.0-alpha.4):Testing
node scripts/test-release-automation.js— 62 passed, 0 failed, including cases for grouping/linking, the empty-range fallback, lane-aware tag selection, and @-mention escaping. The script also has a--selftestfor a quick standalone check.