Skip to content

feat(release): use extracted CHANGELOG notes instead of --generate-notes - #49

Merged
asachs01 merged 1 commit into
mainfrom
feat/release-notes-extraction
Sep 4, 2026
Merged

feat(release): use extracted CHANGELOG notes instead of --generate-notes#49
asachs01 merged 1 commit into
mainfrom
feat/release-notes-extraction

Conversation

@asachs01

@asachs01 asachs01 commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Identical pass following the canary (WYRE-AI/node-datto-rmm#77, murph-reviewed and merged) for task_1788458278413_29823067.

Adds scripts/extract-release-notes.mjs and rewires PUBLISH mode's gh release create to use --notes-file from it instead of --generate-notes, falling back to --generate-notes on any read/parse failure or empty output (fail-open, boss's requirement). Byte-identical diff to the canary, which includes the fix for the single-# minor/major heading bug murph caught in review.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Summary by CodeRabbit

  • Chores
    • Release creation now uses the curated notes for the matching version from the changelog when available.
    • If curated notes cannot be extracted, release creation automatically falls back to generated GitHub release notes.
    • Release note extraction validates version formatting and reports errors clearly when changelog content is unavailable or invalid.

PUBLISH mode's gh release create used GitHub's own --generate-notes
auto-summary, which diverges from the curated notes semantic-release
already wrote to CHANGELOG.md during PREPARE mode (CodeRabbit catch,
task_1788457898992, deferred to a fast-follow).

scripts/extract-release-notes.mjs pulls the released version's section
out of CHANGELOG.md and FAILS OPEN by design (boss's requirement): any
read/parse failure or empty section exits 1, and the workflow step
falls back to --generate-notes rather than ever blocking a publish over
a cosmetic notes gap.

Byte-identical to the canary (node-datto-rmm#77, murph-reviewed): the
regex bug murph caught there (single-# minor/major headings not
recognized as section boundaries) is already fixed in this version --
re-validated against this repo's own real CHANGELOG.md before pushing.
@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 980c93bf-a741-4b9e-b6dc-f0a91ec88051

📥 Commits

Reviewing files that changed from the base of the PR and between ed10f7f and 5c92d8c.

📒 Files selected for processing (2)
  • .github/workflows/release.yml
  • scripts/extract-release-notes.mjs

Included review availability: Your plan provides up to 10 included reviews per hour; 5 remain after this review.


📝 Walkthrough

Walkthrough

The release workflow now extracts the requested version’s notes from CHANGELOG.md. It uses those notes for GitHub releases and falls back to generated notes when extraction fails or returns no content.

Changes

Release notes extraction

Layer / File(s) Summary
Changelog extraction and validation
scripts/extract-release-notes.mjs
The CLI validates the version, reads CHANGELOG.md, supports one- and two-level version headings, and outputs a non-empty notes section.
Release creation integration
.github/workflows/release.yml
The workflow uses --notes-file for successful extraction and --generate-notes after extraction failure or empty output.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 5c92d

Release publishing now uses curated changelog notes when available and retains generated GitHub notes as a fallback, with no current merge-blocking risk identified.

Sequence Diagram(s)

sequenceDiagram
  participant ReleaseWorkflow
  participant ExtractReleaseNotes
  participant CHANGELOG
  participant GitHubRelease
  ReleaseWorkflow->>ExtractReleaseNotes: extract notes for the release version
  ExtractReleaseNotes->>CHANGELOG: read CHANGELOG.md
  CHANGELOG-->>ExtractReleaseNotes: changelog content
  alt notes are non-empty
    ExtractReleaseNotes-->>ReleaseWorkflow: release notes
    ReleaseWorkflow->>GitHubRelease: create release with --notes-file
  else extraction fails or notes are empty
    ExtractReleaseNotes-->>ReleaseWorkflow: exit with status 1
    ReleaseWorkflow->>GitHubRelease: create release with --generate-notes
  end
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: release publishing now uses extracted CHANGELOG notes instead of GitHub-generated notes by default.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/release-notes-extraction

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

@asachs01 asachs01 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed on behalf of murph (formal approval blocked -- shared wyre-agent-fleet identity can't approve its own PR, same wall as usual).

Confirmed byte-identical (diff-verified, not just visually) to the murph-reviewed canary WYRE-AI/node-datto-rmm#77, which included a real content-correctness fix I found and independently re-verified: the CHANGELOG heading regex now matches both ## (patch) and # (minor/major) headings semantic-release emits, fixing a bug where a minor/major release's notes either failed to extract or bled the wrong section's content (including BREAKING CHANGES) into an adjacent patch's release notes.

LGTM. Needs an actual approving click from Aaron -- this repo's branch protection requires 1 distinct-identity approval and no fleet agent can satisfy that here.

@asachs01
asachs01 merged commit 4b2b5a3 into main Sep 4, 2026
3 checks passed
@asachs01
asachs01 deleted the feat/release-notes-extraction branch September 4, 2026 12:24
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