Skip to content

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

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#81
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

  • Release Process
    • Releases now use version-specific notes from CHANGELOG.md when available.
    • If notes cannot be extracted, release creation falls back to automatically generated GitHub notes with a warning.

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: 94a46e52-668d-4d0d-a49b-6f1256e279d1

📥 Commits

Reviewing files that changed from the base of the PR and between 07f64ea and fba4f1b.

📒 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; 1 remains after this review.


📝 Walkthrough

Walkthrough

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

Changes

Release notes publishing

Layer / File(s) Summary
Extract and validate changelog notes
scripts/extract-release-notes.mjs
The script validates the version argument, reads CHANGELOG.md, recognizes one- and two-hash version headings, and prints non-empty matching sections.
Use extracted notes during release creation
.github/workflows/release.yml
The release step uses extracted notes with --notes-file. It falls back to --generate-notes with a warning when extraction fails or returns empty output.

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

Merge Risk: ⚪ Minimal · up to fba4f

Releases now use curated changelog notes when available, while retaining generated GitHub notes as a fallback. No current merge-blocking risk is identified.

Sequence Diagram(s)

sequenceDiagram
  participant ReleaseWorkflow
  participant extract_release_notes
  participant CHANGELOG
  participant GitHubCLI
  ReleaseWorkflow->>extract_release_notes: request notes for release version
  extract_release_notes->>CHANGELOG: read and parse version section
  CHANGELOG-->>extract_release_notes: matching release notes
  alt notes are non-empty
    extract_release_notes-->>ReleaseWorkflow: extracted notes
    ReleaseWorkflow->>GitHubCLI: create release with --notes-file
  else extraction fails or notes are empty
    extract_release_notes-->>ReleaseWorkflow: exit status 1
    ReleaseWorkflow->>GitHubCLI: 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: using extracted CHANGELOG notes instead of GitHub's --generate-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 e79c7c6 into main Sep 4, 2026
5 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