refactor(publish): inline git-cliff release notes (drop changelog-update workflow)#3
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a cliff.toml configuration file for git-cliff to generate release notes from Conventional Commits. The reviewer identified three key areas for improvement: correcting the newline escape sequence in the commit message split pattern to prevent rendering issues, expanding the dependency pattern to capture scopes like deps-dev, and skipping release-related commits to keep the changelog clean.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 96ae692fac
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…ate workflow) PR #2's chained `update-changelog` job (reusable `stella/.github/.github/workflows/changelog-update.yml`) failed at `peter-evans/create-pull-request` because the org-wide setting `can_approve_pull_request_reviews` is disabled and the default `GITHUB_TOKEN` is not allowed to create PRs. The reusable workflow has, in fact, never produced output on any stella repo. Replace the second-PR pattern with `stella/stella`'s working approach: run git-cliff inline in the publish workflow, write `NOTES.md`, and pass `--notes-file NOTES.md` to `gh release create`. - Add `cliff.toml` (copied from stella/stella, with the PR-link postprocessor rewritten to point at stella/tooling). - Drop the `update-changelog` job and the `tag`/`version` outputs it consumed. - Add `fetch-depth: 0` to the checkout (git-cliff needs full history). - Compute the changelog range from the most recent existing stable tag up to HEAD, then feed the args to git-cliff. - Pass the generated `NOTES.md` to `gh release create`. No second PR, no toggle needed, no PR-creation permission needed.
96ae692 to
c85d508
Compare
|
@codex review CC on behalf of @jan-kubica |
|
Codex Review: Didn't find any major issues. Keep it up! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
PR #2's chained
update-changelogjob (reusable workflow atstella/.github/.github/workflows/changelog-update.yml) failed at thepeter-evans/create-pull-requeststep on run 26757624350: the org-wide settingcan_approve_pull_request_reviewsis disabled and the defaultGITHUB_TOKENis not allowed to create PRs. The reusable workflow has not actually produced output on any stella repo (zerochore/changelog-updatePRs exist across the org), so the pattern is non-functional in practice.Switch tooling to the inline pattern already used by
stella/stella'srelease.yml: rungit-cliffinside the publish workflow, writeNOTES.md, and pass--notes-file NOTES.mdtogh release create. No second PR, no org toggle, no PR-creation permission needed.Changes
cliff.toml(copied fromstella/stella, with the PR-link postprocessor rewritten to point atstella/tooling).update-changelogjob and thetag/versionoutputs it consumed.fetch-depth: 0to the checkout (git-cliff needs full history).HEAD; fall back to the first commit on a fresh repo.NOTES.mdwithorhun/git-cliff-action@v4.8.0and pass it togh release create --notes-file.HEAD, and an existing GitHub release gets refreshed notes plus clobbered assets.Follow-up (not in this PR)
The existing
v0.3.0release has an empty body. After this lands it can be backfilled manually with:The next
VERSIONbump will produce a Conventional Commits changelog automatically.Test plan
bun install --frozen-lockfilecleanbun run typecheckcleanbun run lintcleanbun run publintcleanbun run pack:dry-runproduces both tarballsbun testcleanbunx --bun @taplo/cli check cliff.tomlcleanbunx --bun git-cliff --config cliff.toml --tag v0.4.0 --strip header v0.3.0..HEADproduces sectioned notes withstella/toolingPR linksVERSIONbump publishes a release whose body contains the Conventional Commits changelog