feat(release): publish the version's changelog section as the release notes - #591
Open
Farahat612 wants to merge 1 commit into
Open
feat(release): publish the version's changelog section as the release notes#591Farahat612 wants to merge 1 commit into
Farahat612 wants to merge 1 commit into
Conversation
… notes Release tags are lightweight, so the workflow's `gh release create --notes-from-tag` had nothing to read beyond the "Bump to vX.Y.Z" commit subject: every GitHub Release shipped with an effectively empty description, and release watchers saw no notes (oblien#192). scripts/changelog-notes.ts (zero-dep, node:-only) extracts the version's level-2 section from CHANGELOG.md: exact version match (0.6.1 never matches 0.6.10), tolerant of `v`/bracketed/dated headings, bounded by the next version heading. Missing section falls back to a changelog link; a prerelease with no own section borrows the base version's notes with a prerelease preamble; bodies are cut at 120k chars on a line boundary. Every path returns a body: notes can never fail a release. The publish job writes the notes to a file and passes --notes-file (never shell-interpolated: changelog prose is full of backticks), and on re-runs backfills only releases whose body is empty, so hand-edited release pages are never overwritten. The docker-only path creates no release and is untouched. release.ts now surfaces the resolved notes state in its pre-flight summary so a missing section is visible before the tag is pushed. Tests (bun test, wired into the root test script as test:scripts) cover section bounding, version prefix collisions, fallback and prerelease borrowing, truncation, and extraction against the real CHANGELOG.md.
Farahat612
force-pushed
the
feat/changelog-release-notes
branch
from
August 16, 2026 11:50
8b3fad9 to
da16dce
Compare
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.
Release tags are lightweight, so the workflow's
gh release create --notes-from-taghad nothing to read beyond the "Bump to vX.Y.Z" commitsubject: every GitHub Release shipped with an effectively empty
description, and release watchers saw no notes (#192).
scripts/changelog-notes.ts (zero-dep, node:-only) extracts the version's
level-2 section from CHANGELOG.md: exact version match (0.6.1 never
matches 0.6.10), tolerant of
v/bracketed/dated headings, bounded bythe next version heading. Missing section falls back to a changelog
link; a prerelease with no own section borrows the base version's notes
with a prerelease preamble; bodies are cut at 120k chars on a line
boundary. Every path returns a body: notes can never fail a release.
The publish job writes the notes to a file and passes --notes-file
(never shell-interpolated: changelog prose is full of backticks), and
on re-runs backfills only releases whose body is empty, so hand-edited
release pages are never overwritten. The docker-only path creates no
release and is untouched. release.ts now surfaces the resolved notes
state in its pre-flight summary so a missing section is visible before
the tag is pushed.
Tests (bun test, wired into the root test script as test:scripts) cover
section bounding, version prefix collisions, fallback and prerelease
borrowing, truncation, and extraction against the real CHANGELOG.md.
Closes #192.
The actual mechanism: release tags are lightweight, so gh release create
--notes-from-tag had nothing to read and release bodies shipped empty. Most
recent example: v0.6.5 was released with an empty release description; with
this change it would have carried its changelog section, or a changelog link
for a version without one.
The extractor is zero-dependency (node: imports only, runs on bare bun with
no install) and can never fail a release: a missing section falls back to a
changelog-link body, a prerelease with no section of its own borrows the base
version's notes with a preamble, and bodies are cut at 120k chars on a line
boundary. Notes pass through a file so changelog backticks never hit the
shell. Re-runs backfill only empty release bodies, so a hand-edited release
page is never overwritten. The docker-only path creates no release and is
untouched.
Rebased onto current main, so it sits alongside the new release gate job
rather than replacing anything in it.
How verified: 15 bun:test cases (wired into the root test script) including
extraction against the real CHANGELOG.md for every version heading; dry-run
extractions for v0.6.1, v0.4.9, v0.2.0, a prerelease, and missing-section
cases; workflow YAML parse-checked after the rebase, confirming the publish
job keeps both the new gate dependency and the notes steps.