Repository navigation
TML-2533: enforce committed release-notes file as the GitHub Release body - #660
Conversation
Add scripts/check-release-notes.mjs, a pre-publish + PR-CI gate that asserts a committed docs/releases/v<version>.md exists for a stable release, mirroring the two-mode shape of check-upgrade-coverage.mjs. - publish mode: assert the notes file for the target version (--version or root package.json version at --head) exists; non-zero otherwise. - pr mode: no-op unless the root version changed between --prev and --head; on a release bump, assert the matching notes file is present. There is no auto-generated fallback: a release bump without a committed notes file fails loudly. Wired as pnpm check:release-notes and added to the test:scripts node --test set. Refs TML-2533. Signed-off-by: Will Madden <[email protected]>
Wire the check:release-notes gate into the two workflows so the committed docs/releases/v<version>.md becomes the enforced source of the stable GitHub Release body. publish.yml: the latest Release path now publishes the committed file with --notes-file instead of --generate-notes, preceded by a check:release-notes --mode publish gate scoped to latest + non-dry-run (dev/beta builds create no Release). The idempotent gh release edit rerun branch is left untouched, preserving the already-published body. ci.yml: the lint job runs check:release-notes --mode pr alongside the existing check:upgrade-coverage PR gate, so a release PR fails early when it bumps the version without committing the matching notes file. Refs TML-2533. Signed-off-by: Will Madden <[email protected]>
Supply the convention and template the shipped gate + publish workflow already forward-reference. - docs/releases/README.md: the per-release notes convention. Each latest release commits docs/releases/v<version>.md, which becomes the GitHub Release body verbatim (no auto-generated fallback); enforced by check:release-notes in pr + publish mode. Carries a copyable template (Breaking changes -> Features -> Fixes -> New contributors). - CHANGELOG.md: seeded fresh, newest-first. Tracking starts at the next minor; v0.11.0 and earlier point to GitHub Releases (no backfill). - docs/oss/versioning.md: list check:release-notes among the pre-publish gates, document the committed-file Release body (no --generate-notes), and require a notes file in the patch procedure. Refs TML-2533. Signed-off-by: Will Madden <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (8)
📝 WalkthroughWalkthroughThis PR introduces a release notes gating mechanism that requires committed markdown files ( ChangesRelease Notes Enforcement for Stable Releases
Sequence Diagram(s)No sequence diagram generated: the changes are primarily script implementation, test infrastructure, and workflow configuration without a user-facing or inter-service request/response flow that would benefit from visualization. Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
size-limit report 📦
|
@prisma-next/extension-author-tools
@prisma-next/mongo-runtime
@prisma-next/family-mongo
@prisma-next/sql-runtime
@prisma-next/family-sql
@prisma-next/extension-arktype-json
@prisma-next/middleware-cache
@prisma-next/mongo
@prisma-next/extension-paradedb
@prisma-next/extension-pgvector
@prisma-next/extension-postgis
@prisma-next/postgres
@prisma-next/sql-orm-client
@prisma-next/sqlite
@prisma-next/target-mongo
@prisma-next/adapter-mongo
@prisma-next/driver-mongo
@prisma-next/contract
@prisma-next/utils
@prisma-next/config
@prisma-next/errors
@prisma-next/framework-components
@prisma-next/operations
@prisma-next/ts-render
@prisma-next/contract-authoring
@prisma-next/ids
@prisma-next/psl-parser
@prisma-next/psl-printer
@prisma-next/cli
@prisma-next/cli-telemetry
@prisma-next/emitter
@prisma-next/migration-tools
prisma-next
@prisma-next/vite-plugin-contract-emit
@prisma-next/mongo-codec
@prisma-next/mongo-contract
@prisma-next/mongo-value
@prisma-next/mongo-contract-psl
@prisma-next/mongo-contract-ts
@prisma-next/mongo-emitter
@prisma-next/mongo-schema-ir
@prisma-next/mongo-query-ast
@prisma-next/mongo-orm
@prisma-next/mongo-query-builder
@prisma-next/mongo-lowering
@prisma-next/mongo-wire
@prisma-next/sql-contract
@prisma-next/sql-errors
@prisma-next/sql-operations
@prisma-next/sql-schema-ir
@prisma-next/sql-contract-psl
@prisma-next/sql-contract-ts
@prisma-next/sql-contract-emitter
@prisma-next/sql-lane-query-builder
@prisma-next/sql-relational-core
@prisma-next/sql-builder
@prisma-next/target-postgres
@prisma-next/target-sqlite
@prisma-next/adapter-postgres
@prisma-next/adapter-sqlite
@prisma-next/driver-postgres
@prisma-next/driver-sqlite
commit: |
Merge origin/main to resolve PR conflicts. Combine test:scripts entries from both sides (check-release-notes + validate-typescript-peer). Use node:assert/strict default import to avoid introducing a bare `as` cast. Signed-off-by: Will Madden <[email protected]>
Linked issue
Refs TML-2533.
First of two slices. The follow-up TML-2758 (blocked by this PR) adds the
draft-release-notesskill that authors these files automatically; this PR establishes the committed-file contract it fills.At a glance
The stable GitHub Release body now comes from a committed file instead of auto-generated PR titles. Each
latestrelease ships adocs/releases/v<version>.md, and the publish workflow publishes it verbatim:Before this PR, the same step used
--generate-notes, which produced an uncurated list of merged-PR titles (internalTML-NNNN:prefixes and all), only viewable after the release was cut — the maintainer never got to review the notes before they shipped.Notes for the reviewer
latestpublish with nodocs/releases/v<version>.mdnow fails rather than falling back to generated notes. That's deliberate — a missing file means someone skipped authoring, which is exactly what we want to catch. There is no--generate-notesfallback anywhere in.github/workflows/after this PR.latestonly, unlike its siblings (check:publish-deps,check:upgrade-coverage) which run on every publish. Dev/beta builds create no GitHub Release, so there is nothing to gate — the gate step'sif:is byte-identical to the Release step's own condition (tag == 'latest'∧ non-dry-run).gh release editrerun branch is intentionally left untouched (sets title/target only, preserves the already-published body). Re-pushing--notes-fileon a rerun could clobber a hand-edited Release body.publish.yml(+22/−6, mostly the gate step + a comment-block rewrite). Spot-check that no--generate-notessurvives and that the rerun branch is unchanged.check-upgrade-coverage: its two-pointversioncomparison would read a spurious "bump" on a branch sitting behind amainthat has since bumped the version (self-corrects on rebase). Near-impossible in practice — release PRs are cut fresh offorigin/main, and feature PRs don't change the rootversion. Any remedy should apply to both gates, so it's left as-is here.Decision
This PR makes a committed, gate-enforced file the authoritative source of every stable GitHub Release body. Three pieces:
check:release-notes(scripts/check-release-notes.mjs) — a two-mode presence gate mirroring the shape of the existingcheck-upgrade-coverage.mjs.publish.ymlpublishes the committed file via--notes-file(no fallback) behind the gate;ci.ymlruns the PR-mode gate so a release PR that bumps the version without its notes file fails in review.docs/releases/README.md(the convention + authoring template), a freshly-seededCHANGELOG.md, and adocs/oss/versioning.mdupdate threading the notes-file requirement through both the minor and patch procedures.How it works
Authoring + enforcement flow:
docs/releases/v<version>.mdalongside the version bump.docs/releases/README.mdcarries the template — section order Breaking changes → Features → Fixes → New contributors, written for users (no internal issue prefixes), with PR links and contributor attribution.pnpm check:release-notes --mode pr, wired intoci.yml) fires only when a PR changes the rootpackage.jsonversion. It fails the release PR if the matching notes file is absent — so the omission is caught in review, not after merge. It no-ops on ordinary PRs.pnpm check:release-notes --mode publish, wired intopublish.yml) runs immediately before the Release is created, forlatestbuilds only, and fails the publish if the file is missing.--notes-file docs/releases/v<version>.md; what's committed is exactly what readers see on the Releases page.What lands in this PR
0db8d4e3acheck:release-notespresence gate (two modes) + unit tests +package.jsonwiring7480b43a9publish.yml→--notes-filebehind the publish-mode gate;ci.yml→ PR-mode gate6dce97ed2docs/releases/README.mdconvention + template, seededCHANGELOG.md,versioning.mdflow + patch-procedure updateNo release-notes content (
docs/releases/v<version>.md) is authored here — those are written when the next release is cut. Backfilling notes forv0.11.0and earlier is a non-goal;CHANGELOG.mdpoints readers to GitHub Releases for that history and tracks forward from v0.12.0.Testing performed
node --test scripts/check-release-notes.test.mjs— 12/12 pass (both modes: missing/present file, version-bump/no-bump,--versionoverride,--jsonenvelope).node scripts/lint-workflow-triggers.mjs— exit 0 (no newon:triggers).pnpm check:release-notes --mode pron this branch — exit 0 (this PR doesn't bump the rootversion, so PR mode no-ops as designed).latestpublish renders the committed file as the Release body is exercised on the next real release or aworkflow_dispatchdry-run (can't run GitHub Actions from here).Skill update
n/a — no user-facing API/CLI/config surface changes. The maintainer-facing release procedure is documented in
docs/oss/versioning.mdanddocs/releases/README.md. The agent-authoring skill (draft-release-notes) is the separate follow-up TML-2758.Follow-ups
draft-release-notesskill that authorsdocs/releases/v<version>.mdautomatically and wires intopublish-npm-version. Blocked by this PR.Alternatives considered
.github/release.yml+ PR labels to categorize GitHub's auto-generated notes. Rejected: it still generates from PR titles post-merge (no pre-merge review), and it imposes label discipline on every PR.--generate-notesas a fallback when the file is absent. Rejected: a silent fallback is exactly the flat-notes outcome this project exists to remove. Failing loudly makes curated notes an invariant.Checklist
git commit -s) per the DCO.scripts/check-release-notes.test.mjs).TML-NNNN: <sentence-case title>form.Summary by CodeRabbit
Documentation
Chores