Skip to content

feat(release): generate rich release notes from milestone + auto PR list#21

Merged
ChrisonSimtian merged 1 commit into
mainfrom
feat/release-notes
May 18, 2026
Merged

feat(release): generate rich release notes from milestone + auto PR list#21
ChrisonSimtian merged 1 commit into
mainfrom
feat/release-notes

Conversation

@ChrisonSimtian

Copy link
Copy Markdown
Collaborator

Summary

The first release (`10.2.0`, just merged) shipped with an empty body because the base `ICreateGitHubRelease` implementation reads from `CHANGELOG.md`'s `[vNext]` section, which we don't maintain.

Replaces that with a milestone-aware release-notes builder that produces something actually useful.

What changes in the release body

For each release tag pushed to main, the generated GitHub Release now contains:

  1. Milestone header — linked title of the milestone whose name starts with the release version (matches our `"10.2.0 - "` convention).
  2. Pull requests in this milestone — grouped list with PR number + author.
  3. Issues closed in this milestone — grouped list.
  4. Auto-generated diff — GitHub's native `generate_release_notes` appends the full PR-since-last-tag list. Covers anything that wasn't attached to a milestone.

Each milestone item also gets a "Released in vX.Y.Z! 🎉" comment, same as before — but the milestone-lookup is now prefix-matched instead of requiring an exact `v10.2.0` title.

Why not inherit the base

The base `.Inherit()` always runs first and creates the release with the CHANGELOG body. Then our override would add to it. To replace the body entirely, we own the create-release call directly. Octokit usage is consistent with the rest of `Build.cs`.

Test plan

  • `dotnet build build/_build.csproj` — 0 errors
  • Next release to main (`10.2.1` or whatever git-height produces) shows the rich body
  • Milestone-item comments still fire

Follow-ups

  • `MajorMinorPatchVersion` still uses GitVersion. Now that Nerdbank drives versions, should switch to reading from there for consistency.
  • Once the project rename happens and we have labels, can configure `.github/release.yml` to group GitHub's auto-generated list by category (Features / Bug fixes / Chore).

🤖 Generated with Claude Code

The base ICreateGitHubRelease implementation pulls the release body
from CHANGELOG.md's [vNext] section, which we don't maintain on this
fork — first release ended up with an empty body. Rewrites the
override to:

- Find the milestone whose title starts with the release version
  (matches our "10.2.0 - <desc>" convention and the legacy "v10.2.0"
  form).
- List pull requests and issues from the milestone, grouped, with
  links and author handles.
- Set GenerateReleaseNotes=true so GitHub appends its auto-generated
  PR-since-last-tag list — covers anything not attached to a
  milestone.
- Comment "Released in <version>! 🎉" on every milestone item once
  the release is created.

Drops .Inherit<ICreateGitHubRelease>() so we own the create-release
call directly; preserves Octokit usage idiomatic to the rest of the
codebase.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ChrisonSimtian
ChrisonSimtian merged commit 23969fb into main May 18, 2026
2 checks passed
@ChrisonSimtian
ChrisonSimtian deleted the feat/release-notes branch May 18, 2026 08:01
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