Skip to content

fix(release): publish version changelog notes with the shared parser - #591

Merged
Hydralerne merged 2 commits into
oblien:feat/bugfix-batch-2026-09-16from
Farahat612:feat/changelog-release-notes
Sep 16, 2026
Merged

Hydralerne merged 2 commits into
oblien:feat/bugfix-batch-2026-09-16from
Farahat612:feat/changelog-release-notes

Conversation

@Farahat612

@Farahat612 Farahat612 commented Aug 16, 2026 •

Copy link
Copy Markdown
Contributor

GitHub releases currently use tag notes even though release tags are lightweight, leaving descriptions empty or reduced to a commit subject. This adapts the contributor’s fix to publish the matching CHANGELOG.md section and targets the #892 bug integration branch.

The website, updater and release workflow now share the core changelog parser. Exact version matching preserves prerelease/build suffixes, handles dated/bracketed headings and ignores headings inside fenced examples. The workflow imports only the dependency-free parser and needs no package installation. Missing entries use a changelog link; long entries stay within GitHub’s limit. Both custom-file CLI forms work.

Reruns keep manually edited descriptions. Empty descriptions may be backfilled, but a failed read never counts as proof that the description is empty; a backfill failure does not undo successful asset uploads.

Validation:

  • 30 script cases and 27 core changelog/updater cases pass; core and website TypeScript pass.
  • The new exact-version regression fails against main. Two CLI/truncation regressions fail against the original PR implementation.
  • The release shell was executed with stubbed GitHub commands for creation, empty-note backfill, manual notes, failed reads and failed edits. No releases were published during verification.
  • A bare checkout fixture without node_modules produces the same release notes.

Original contributor commits are retained. This fixes #192 once #892 is merged into main.

… 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.
@Hydralerne Hydralerne changed the title feat(release): publish the version's changelog section as the release notes fix(release): publish version changelog notes with the shared parser Sep 16, 2026
@Hydralerne
Hydralerne changed the base branch from main to feat/bugfix-batch-2026-09-16 September 16, 2026 05:15
@Hydralerne
Hydralerne merged commit d4d6290 into oblien:feat/bugfix-batch-2026-09-16 Sep 16, 2026
3 of 8 checks passed
@Farahat612
Farahat612 deleted the feat/changelog-release-notes branch October 23, 2026 18:54
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.

Publish changelog entries in GitHub Release descriptions

2 participants