fix(root): check a staged changeset at commit time - #1797
Conversation
A changeset is read by the release, and one whose frontmatter never closes fails `changeset version` for everybody once it is on main. CI runs `check-changesets.mjs` on a pull request's changesets, and it refuses such a file -- but a pull request merged while CI is still queued lands before the check runs. Two such files landed on main in one afternoon that way, each needing a repair pull request of its own. The same checker now runs from lint-staged on any staged `.changeset/*.md`, so the refusal reaches the author at commit time whatever the queue is doing. lint-staged runs serially in the hook: the changeset glob and the prettier glob both match those files, and run at once the checker can read a file prettier is halfway through writing.
|
@codex review |
|
Warning Review limit reachedNext included review available in 59 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
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 |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ 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". |
@nextlyhq/adapter-drizzle
@nextlyhq/adapter-mysql
@nextlyhq/adapter-postgres
@nextlyhq/adapter-sqlite
@nextlyhq/admin
@nextlyhq/admin-css
@nextlyhq/blocks-engine
@nextlyhq/blocks-react
@nextlyhq/builder
create-nextly-app
@nextlyhq/eslint-plugin
nextly
@nextlyhq/plugin-form-builder
@nextlyhq/plugin-page-builder
@nextlyhq/plugin-sdk
@nextlyhq/plugin-seo
@nextlyhq/storage-s3
@nextlyhq/storage-uploadthing
@nextlyhq/storage-vercel-blob
@nextlyhq/ui
commit: |
What
Two changesets whose frontmatter never closed reached
mainthis afternoon (#1784's, repaired in #1791; thencd9554690's, repaired in #1795). Each brokepnpm changeset statusfor every checkout ofmainand would have failed the release's version step. CI'sChangeset covers the lockstep groupstep refuses exactly these files — both merged while CI was still queued, so the gate ran after the merge.The same checker,
scripts/release/check-changesets.mjs, now runs from lint-staged on any staged.changeset/*.md, so the refusal reaches the author at commit time regardless of the CI queue..husky/pre-commitruns lint-staged with--concurrent false: the changeset glob and the prettier glob both match those files, and run in parallel the checker can read a file prettier is halfway through writing.Evidence
Through the real hook, on this branch:
git commitrefused:✖ .changeset/zz-probe-malformed.md: the frontmatter is missing or has a line this cannot read...git commitsucceeded withChecked 1 changeset(s): all cover the group.(probe commit reset and the file removed before this push)CI-only/tooling change — no changeset.