[PR #9011] [MERGED] ci: restructure release notes to group by npm package #25269

Closed
opened 2026-04-15 22:48:04 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/9011
Author: @gustavovalverde
Created: 4/7/2026
Status: Merged
Merged: 4/9/2026
Merged by: @gustavovalverde

Base: mainHead: ci/release-notes-by-package


📝 Commits (2)

  • bb0d5ba ci: restructure release notes to group by npm package
  • 05fc3f6 fix(ci): address review feedback and unblock AI release notes rewrite

📊 Changes

4 files changed (+374 additions, -85 deletions)

View changed files

📝 .github/prompts/release-notes-rewrite.md (+33 -9)
📝 .github/scripts/lib/pr-analyzer.ts (+101 -0)
📝 .github/scripts/release-notes.ts (+239 -76)
📝 .github/workflows/release.yml (+1 -0)

📄 Description

Summary

Restructures the automated release notes pipeline to group entries by npm package name instead of internal triage domains, matching how users install and configure Better Auth.

Before: Entries grouped by domain (Core, Database, Enterprise, Identity, etc.) with **BREAKING:** prefix inline.

After: Entries grouped by package (better-auth, @better-auth/sso, @better-auth/oauth-provider, etc.) with ### ⚠️ Breaking Changes / ### Features / ### Bug Fixes subsections per package.

Changes

pr-analyzer.ts — 3 new exports:

  • SCOPE_TO_PACKAGE: maps commit scopes to npm package names
  • resolvePackage(): resolves package from scope or file paths
  • classifyChangeType(): categorizes entries as breaking / feat / fix

release-notes.ts — new output format:

  • ReleaseEntry now carries packageName and changeType
  • formatReleaseBody() groups by package with change-type subsections
  • No per-entry by @author; single ## Contributors section at the end
  • Blog post link at top for stable releases
  • Packages sorted: better-auth first, then by breaking count, then entry count

release-notes-rewrite.md — updated AI prompt:

  • Structural rules reference package headings instead of domain headings
  • Breaking changes transformed into rich format with bold title, context, and migration code snippets

Test plan

  • Run node --experimental-strip-types .github/scripts/release-notes.ts --version 1.6.0 --branch origin/main --dry-run and verify output groups by package
  • Verify better-auth appears first, external packages follow sorted by breaking count
  • Verify breaking entries appear under ### ⚠️ Breaking Changes, features under ### Features, fixes under ### Bug Fixes
  • Verify no by @author on individual lines, contributors listed at bottom
  • Verify blog post link appears for stable versions, omitted for betas

Summary by cubic

Restructures the release notes generator to group changes by npm package with per-package change-type sections, aligning the notes with how users install and configure better-auth packages. Improves clarity and sorting, and adds a contributors roll-up.

  • Refactors

    • Group entries by npm package (better-auth, @better-auth/sso, etc.); better-auth appears first, others sorted by breaking-count, then size.
    • Add ### ⚠️ Breaking Changes, ### Features, and ### Bug Fixes subsections per package.
    • Resolve package from commit scope or file paths via resolvePackage and SCOPE_TO_PACKAGE (adds cli); map packages/cli/ to the auth package; classify entries with classifyChangeType.
    • Remove per-entry author lines; add a single "Contributors" section; add a blog post link for stable releases; keep the full changelog link.
    • Update release-notes-rewrite.md prompt to use package headings and enrich breaking changes with titles and migration code snippets, asking for the exact migration action.
  • Bug Fixes

    • Fix deduplication when the previous GitHub release has no body so cherry-picked PRs aren’t listed twice.
    • Allow github-merge-queue to trigger the notes rewrite by adding it to allowed_bots in the release workflow.

Written for commit 05fc3f67f7. Summary will update on new commits.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/9011 **Author:** [@gustavovalverde](https://github.com/gustavovalverde) **Created:** 4/7/2026 **Status:** ✅ Merged **Merged:** 4/9/2026 **Merged by:** [@gustavovalverde](https://github.com/gustavovalverde) **Base:** `main` ← **Head:** `ci/release-notes-by-package` --- ### 📝 Commits (2) - [`bb0d5ba`](https://github.com/better-auth/better-auth/commit/bb0d5bab2809c4e128b607b10e33df3f66e9b98c) ci: restructure release notes to group by npm package - [`05fc3f6`](https://github.com/better-auth/better-auth/commit/05fc3f67f73709823f7db875c3b10ab64ab4ce27) fix(ci): address review feedback and unblock AI release notes rewrite ### 📊 Changes **4 files changed** (+374 additions, -85 deletions) <details> <summary>View changed files</summary> 📝 `.github/prompts/release-notes-rewrite.md` (+33 -9) 📝 `.github/scripts/lib/pr-analyzer.ts` (+101 -0) 📝 `.github/scripts/release-notes.ts` (+239 -76) 📝 `.github/workflows/release.yml` (+1 -0) </details> ### 📄 Description ## Summary Restructures the automated release notes pipeline to group entries by npm package name instead of internal triage domains, matching how users install and configure Better Auth. **Before:** Entries grouped by domain (`Core`, `Database`, `Enterprise`, `Identity`, etc.) with `**BREAKING:**` prefix inline. **After:** Entries grouped by package (`better-auth`, `@better-auth/sso`, `@better-auth/oauth-provider`, etc.) with `### ⚠️ Breaking Changes` / `### Features` / `### Bug Fixes` subsections per package. ### Changes **`pr-analyzer.ts`** — 3 new exports: - `SCOPE_TO_PACKAGE`: maps commit scopes to npm package names - `resolvePackage()`: resolves package from scope or file paths - `classifyChangeType()`: categorizes entries as `breaking` / `feat` / `fix` **`release-notes.ts`** — new output format: - `ReleaseEntry` now carries `packageName` and `changeType` - `formatReleaseBody()` groups by package with change-type subsections - No per-entry `by @author`; single `## Contributors` section at the end - Blog post link at top for stable releases - Packages sorted: `better-auth` first, then by breaking count, then entry count **`release-notes-rewrite.md`** — updated AI prompt: - Structural rules reference package headings instead of domain headings - Breaking changes transformed into rich format with bold title, context, and migration code snippets ## Test plan - [ ] Run `node --experimental-strip-types .github/scripts/release-notes.ts --version 1.6.0 --branch origin/main --dry-run` and verify output groups by package - [ ] Verify `better-auth` appears first, external packages follow sorted by breaking count - [ ] Verify breaking entries appear under `### ⚠️ Breaking Changes`, features under `### Features`, fixes under `### Bug Fixes` - [ ] Verify no `by @author` on individual lines, contributors listed at bottom - [ ] Verify blog post link appears for stable versions, omitted for betas <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Restructures the release notes generator to group changes by npm package with per-package change-type sections, aligning the notes with how users install and configure `better-auth` packages. Improves clarity and sorting, and adds a contributors roll-up. - **Refactors** - Group entries by npm package (`better-auth`, `@better-auth/sso`, etc.); `better-auth` appears first, others sorted by breaking-count, then size. - Add `### ⚠️ Breaking Changes`, `### Features`, and `### Bug Fixes` subsections per package. - Resolve package from commit scope or file paths via `resolvePackage` and `SCOPE_TO_PACKAGE` (adds `cli`); map `packages/cli/` to the `auth` package; classify entries with `classifyChangeType`. - Remove per-entry author lines; add a single "Contributors" section; add a blog post link for stable releases; keep the full changelog link. - Update `release-notes-rewrite.md` prompt to use package headings and enrich breaking changes with titles and migration code snippets, asking for the exact migration action. - **Bug Fixes** - Fix deduplication when the previous GitHub release has no body so cherry-picked PRs aren’t listed twice. - Allow `github-merge-queue` to trigger the notes rewrite by adding it to `allowed_bots` in the release workflow. <sup>Written for commit 05fc3f67f73709823f7db875c3b10ab64ab4ce27. Summary will update on new commits.</sup> <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-15 22:48:04 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#25269