Repository navigation
ci(release): start generated release notes at the previous tag of the same kind - #303
Merged
Merged
Conversation
… same kind `gh release create --generate-notes` with no start tag diffs against the latest release of any kind. The adapter release spec-kit-v0.1.5 therefore listed every pull request since v0.18.0 (agent plugin, CI, and docs), and v0.19.0 would have started at spec-kit-v0.1.5, leaving those pull requests out of both lockstep releases. `scripts/release-notes-start-tag.ts` picks the highest existing tag of the same kind below the one being released, by SemVer: `v*` for lockstep and `<adapter>-v*` for an adapter. The moving `v0`, pre-releases, and action-recovery-block markers never match. A first release of a kind passes no start tag; an invalid tag fails the step. Against the real tags it prints v0.18.0 for v0.19.0 and spec-kit-v0.1.5 for spec-kit-v0.1.6. The recovery contract test pins the new command lines and fetch-depth: 0. Observed failing first: a dropped kind filter, string ordering, and the old workflow (ADR-0016). Signed-off-by: Mark Beacom <m@beacom.dev>
There was a problem hiding this comment.
🟢 Approval recommended
The implementation, workflow integration, tests, and documentation consistently address cross-kind release-note boundaries.
0 open findings
What changed in this PR
Ensures generated release notes compare against the previous release tag of the same release kind.
Changes:
- Adds SemVer-aware same-kind tag selection with tests.
- Wires the selected tag into the release workflow.
- Documents the release-note guarantee.
Automated ADR context resolution was unavailable; repository guidance was reviewed directly.
| File | Description |
|---|---|
scripts/release-notes-start-tag.ts |
Selects the prior same-kind release tag. |
scripts/release-notes-start-tag.test.ts |
Tests parsing, filtering, and ordering. |
scripts/action-tag-recovery-contract.test.ts |
Verifies release-workflow wiring. |
.github/workflows/release.yml |
Passes the selected start tag to gh. |
docs/RELEASING.md |
Documents the updated behavior. |
🧠 Review effort: Balanced
Decisions governing this change6 accepted decisions govern this change
Links point at |
2 of 3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
The Release workflow ran
gh release create --generate-noteswith no start tag, so GitHub diffed against the latest release of any kind. spec-kit-v0.1.5's notes listed every PR since v0.18.0 (#274 and #277–#282: plugin, CI, docs), and v0.19.0 would have started at spec-kit-v0.1.5, leaving those PRs out of both lockstep releases.scripts/release-notes-start-tag.tspicks the highest existing tag of the same kind below the one being released, by SemVer:v*for lockstep,<adapter>-v*for adapters. The movingv0, pre-releases, andaction-recovery-block/*never match. A first release of a kind passes no start tag (GitHub's default), and an invalid tag fails the step rather than falling back. Bun is already set up in that job, and checkout usesfetch-depth: 0, which a contract test now asserts.Against this repo's tags it prints
v0.18.0forv0.19.0andspec-kit-v0.1.5forspec-kit-v0.1.6. A dry run of the step with a fakeghproduced--generate-notes --notes-start-tag v0.18.0for the lockstep draft.Checklist
packages/ci, or core: n/a.release.yml, which fails the contract test.bun test scripts: 1133 pass.typecheck,lint,check:stale-refs, andcheck:changelogare clean.Notes for reviewers
.github/workflows/andscripts/, so it needsgate-change-acknowledged.