ci: give the release-notes job full git history - #250
Merged
Conversation
v0.3.0 shipped with a release body reading "0 commits." actions/checkout is shallow by default, so the fetched commit has no parents and `git rev-list --max-parents=0 HEAD` returns HEAD itself. The range is then empty and gen-release-notes has nothing to walk. It looks correct when run locally, where the clone is complete — which is why this passed a manual check before the tag. Only the github-release job reads history; the other four checkouts stay shallow. Co-Authored-By: Claude Opus 5 <[email protected]>
7 tasks
oratis
added a commit
that referenced
this pull request
Aug 9, 2026
`gen-release-notes.ts` walked a commit range, and with no preceding tag it fell back to the root commit. That is how v0.3.0's release page came to read "0 commits." — #250 fixed the shallow clone that produced the empty range, but the underlying choice was still to describe a release by its commit subjects. CHANGELOG.md already says what shipped, written for people, grouped by what the changes mean rather than by the verb the commit happened to start with. A list of commit subjects is what you write when nobody wrote anything better. So `--version` makes that entry the release body. The commit walk remains the fallback and announces itself, in the body and on stderr: notes generated because nobody wrote a changelog entry should not look like notes somebody wrote. Repo-relative links are rewritten to absolute URLs pinned at the tag. A release body is not rendered inside the repository, so `docs/file-contract.md` resolves against nothing and 404s; pinning at the tag rather than the default branch also keeps a v0.3.0 link pointing at the v0.3.0 document after the file moves. `[Unreleased]` cannot satisfy the lookup — a release that shipped whatever happened to be sitting under that heading would be lying about its contents. Also passes a scrubbed environment to the git calls, for the reason in #252. It duplicates six lines rather than importing `gitSpawnEnv`, because the release job runs this with `npx tsx` after install but before any build, so core's `dist/` does not exist yet. Co-Authored-By: Claude Opus 5 <[email protected]>
oratis
added a commit
that referenced
this pull request
Aug 9, 2026
`gen-release-notes.ts` walked a commit range, and with no preceding tag it fell back to the root commit. That is how v0.3.0's release page came to read "0 commits." — #250 fixed the shallow clone that produced the empty range, but the underlying choice was still to describe a release by its commit subjects. CHANGELOG.md already says what shipped, written for people, grouped by what the changes mean rather than by the verb the commit happened to start with. A list of commit subjects is what you write when nobody wrote anything better. So `--version` makes that entry the release body. The commit walk remains the fallback and announces itself, in the body and on stderr: notes generated because nobody wrote a changelog entry should not look like notes somebody wrote. Repo-relative links are rewritten to absolute URLs pinned at the tag. A release body is not rendered inside the repository, so `docs/file-contract.md` resolves against nothing and 404s; pinning at the tag rather than the default branch also keeps a v0.3.0 link pointing at the v0.3.0 document after the file moves. `[Unreleased]` cannot satisfy the lookup — a release that shipped whatever happened to be sitting under that heading would be lying about its contents. Also passes a scrubbed environment to the git calls, for the reason in #252. It duplicates six lines rather than importing `gitSpawnEnv`, because the release job runs this with `npx tsx` after install but before any build, so core's `dist/` does not exist yet. Co-Authored-By: Claude Opus 5 <[email protected]>
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.
Summary
v0.3.0 shipped with an empty release body — it reads
0 commits.where nine PRs of work should be listed.actions/checkoutis shallow by default. The single fetched commit therefore has no parents, so:…walks an empty range.
Only
github-releasereads history, so only that checkout getsfetch-depth: 0. The other four stay shallow.Why a manual check missed it
I ran
gen-release-notes.tslocally before the tag and it produced correct, well-grouped output — because a local clone has full history. The script was never the problem; its input was. Worth recording, because "I tested the script" is exactly the check that doesn't catch this.Follow-up
The published v0.3.0 body needs regenerating — I'll do that with
gh release editonce this merges, so the existing release stops under-reporting what's in it.Test plan
git rev-list --max-parents=0 HEADreturns HEAD in a shallow clone, giving an empty rangeRelease notes label
release-notes:internalRelated
Fifth
release.ymldefect surfaced by the first real release. Follows #246, #247, #248, #249.🤖 Generated with Claude Code