Skip to content

fix(changelog): preserve custom release-note sections like "What's New"#87

Merged
nyaomaru merged 2 commits intomainfrom
fix/preserve-custom-release-note
Feb 21, 2026
Merged

fix(changelog): preserve custom release-note sections like "What's New"#87
nyaomaru merged 2 commits intomainfrom
fix/preserve-custom-release-note

Conversation

@nyaomaru
Copy link
Copy Markdown
Owner

@nyaomaru nyaomaru commented Feb 21, 2026

Close #86

Summary

Preserve custom release-note sections like "What's New"

Description

  • Preserve custom top-level (##) sections from GitHub release notes when generating/updating CHANGELOG.md (including ## What’s New).
  • Normalize heading matching for What's Changed / What’s Changed and Full Changelog variants.
  • Keep original custom-section order and avoid duplicate section rendering.
  • Keep existing What's Changed categorization and Full Changelog link behavior.
  • Add tests for section extraction and rendering:
    • tests/utils/release.test.ts
    • tests/utils/llm-output.test.ts

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the release-notes parsing and changelog rendering pipeline so that custom top-level (##) sections in GitHub Release Notes (e.g., “What’s New”) are preserved in generated/updated CHANGELOG.md, including better handling of typographic heading variants.

Changes:

  • Extend parseReleaseNotes to normalize “What’s Changed” / “Full Changelog” heading matching and to preserve custom ## sections (deduped, order preserved).
  • Update release-notes fallback generation to proceed when custom sections exist even if no PR items are parsed.
  • Add tests covering custom-section extraction/deduplication and rendering when there are no parsed items.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/utils/release.ts Normalizes heading matching and preserves/dedupes custom ## sections from release notes.
src/utils/llm-output.ts Allows release-notes-based output when additional sections exist without parsed items.
tests/utils/release.test.ts Adds coverage for typographic headings and custom-section preservation/deduplication.
tests/utils/llm-output.test.ts Adds coverage for rendering custom sections when no PR items are parsed.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@nyaomaru nyaomaru merged commit b4a4dd2 into main Feb 21, 2026
2 checks passed
@nyaomaru nyaomaru deleted the fix/preserve-custom-release-note branch February 21, 2026 16:15
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.

bug: "What's New" section is not reflected in CHANGELOG updates

2 participants