Skip to content

ci(release): grouped, linked changelog in the auto-created release PR body - #4525

Merged
matthew-dean merged 2 commits into
less:alphafrom
matthew-dean:chore/release-pr-changelog
Sep 7, 2026
Merged

ci(release): grouped, linked changelog in the auto-created release PR body#4525
matthew-dean merged 2 commits into
less:alphafrom
matthew-dean:chore/release-pr-changelog

Conversation

@matthew-dean

@matthew-dean matthew-dean commented Sep 7, 2026

Copy link
Copy Markdown
Member

What this does

The Create Release PR workflow auto-opens a chore: release vX.Y.Z-alpha.N PR whenever code lands on alpha (or master). 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):

  • each commit's short SHA and subject, and
  • the issues/PRs it references — inline #NNN and Closes/Fixes #NNN from the commit body are both linked to the repo's issues.

How

  • New scripts/release-changelog.js reads git 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.yml composes the body as the existing preamble + this changelog. It sets the body on PR creation and refreshes it with gh pr edit on subsequent pushes, so the changelog stays current as commits land on the release branch.
  • Range is the previous lane-matching release tag reachable from HEAD (alpha PR → newest reachable X.Y.Z-alpha.N; master → newest non-prerelease), so a stable tag merged into alpha never skews the "since last alpha" range. Links use GITHUB_REPOSITORY.
  • @-prefixed Less variable names in subjects (e.g. @block1) are emitted as the &#64; entity so they render as literal text, not GitHub @-mentions.
  • If changelog generation fails, the workflow step aborts (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

  • 870f1f2d less5: experimental dev browser bundle (dist/less-browser-dev.js)

Bug Fixes

  • bb0b7de7 less5: strictUnits: false means the default (preserve); every use warns
  • 7ed6ec4e less5: support unitMode; strictUnits is a deprecated alias, not unsupported
  • c1e45e5d less5: browser bundle exposes window.less with 4.x-compatible render
  • f18cc429 release: drop redundant post-tag-push origin/master fetch
  • b84b6dfe release: drop behind-master gate blocking alpha publishes

Tests

  • 16b2f1c7 units: no-strict expects calc() under Less 5; add explicit unitMode loose fixture
  • d6ac8c60 v5: graduate mixins-guards to §4.1 string ground and §4.2 trichotomy
  • 68987c90 v5: graduate unit-algebra fixtures to §4.7 preserved spelling

Chores

  • 1519dca3 less5: pin Jess 2.0.0-alpha.16; incompatible-unit math renders as calc()
  • 93a26158 less5: V18 preserve follow-ups — fixture, expected-failure, default wording
  • e25737e0 less5: rename browser-v5 -> browser-dev
  • 6929c47b alpha: bump Jess stack to 2.0.0-alpha.15, drop parseman pin

Other Changes

  • bd2d25d2 test-data(units): no-strict golden is loose, not preserve
  • 04a15d6c test-data(functions): rename invalid @1 detached-ruleset var to @block1
  • e7626e8c test-data(url-args): graduate to v5 — preserve authored newline+indent in multi-line src value
  • 7d07c112 Less 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):

  • 2244d804 bump jess pins to 2.0.0-alpha.17 (#4523)

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 --selftest for a quick standalone check.

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.
@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: 9518db0e-990a-4df5-92c2-59e68350a3f1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Sep 7, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adds a release-changelog generator and integrates it into release-PR creation and refreshes.

  • Groups commits under conventional-commit headings and links issue references.
  • Updates existing release PR bodies as new commits land.
  • Adds focused rendering and empty-range tests.
  • Lane-agnostic tag selection can derive the wrong range when stable and alpha tags coexist in alpha history.
  • Generator failures are currently converted into blank changelog updates.

Confidence Score: 4/5

The PR should not merge until changelog tag selection reliably follows the active release lane; failure handling should also avoid replacing valid notes with a blank changelog.

The renderer itself is well covered, but the live workflow derives its range from any graph-nearest tag, which can produce materially incorrect alpha release notes after a newer stable tag enters alpha history.

Files Needing Attention: scripts/release-changelog.js, .github/workflows/create-release-pr.yml

Reviews (1): Last reviewed commit: "ci(release): generate grouped, linked ch..." | Re-trigger Greptile

Comment thread scripts/release-changelog.js
Comment thread .github/workflows/create-release-pr.yml Outdated
…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.
@matthew-dean
matthew-dean merged commit 059f6cb into less:alpha Sep 7, 2026
12 checks passed
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.

1 participant