Skip to content

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

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#85
asachs01 merged 1 commit into
mainfrom
feat/release-notes-extraction

Conversation

@asachs01

@asachs01 asachs01 commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

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

  • New Features
    • Releases now use curated notes from the changelog when available.
    • Added fallback to automatically generated release notes when curated notes are unavailable.
    • Improved extraction and validation of version-specific changelog sections.

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: 11720eb5-769e-4b66-9907-b32eedc6d702

📥 Commits

Reviewing files that changed from the base of the PR and between 6254c24 and a7edf69.

📒 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; 3 remain after this review.


📝 Walkthrough

Walkthrough

The pull request adds a CLI to extract version sections from CHANGELOG.md. The release workflow uses extracted notes when available and falls back to GitHub-generated notes when extraction fails or returns empty output.

Changes

Release notes workflow

Layer / File(s) Summary
Changelog section extraction
scripts/extract-release-notes.mjs
The CLI validates the version, reads CHANGELOG.md, supports one- and two-level semantic-release headings, extracts the matching section, and rejects missing or empty sections.
Release creation integration
.github/workflows/release.yml
The workflow passes extracted notes through --notes-file. It warns and uses --generate-notes when extraction fails or returns empty output.

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

Merge Risk: ⚪ Minimal · up to a7edf

Release publishing now uses matching 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 release version
  ExtractReleaseNotes->>CHANGELOG: read CHANGELOG.md
  CHANGELOG-->>ExtractReleaseNotes: changelog content
  ExtractReleaseNotes-->>ReleaseWorkflow: notes or extraction error
  ReleaseWorkflow->>GitHubRelease: create release with notes file or generated notes
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 creation now uses extracted CHANGELOG notes instead of GitHub-generated notes.
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
Collaborator 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 f5f3ddc into main Sep 4, 2026
6 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