Skip to content

fix(ci): require new changeset per PR, emit one from schema regen#157

Merged
benminer merged 1 commit intomainfrom
feature/schema-changeset
Apr 24, 2026
Merged

fix(ci): require new changeset per PR, emit one from schema regen#157
benminer merged 1 commit intomainfrom
feature/schema-changeset

Conversation

@benminer
Copy link
Copy Markdown
Collaborator

Summary

  • Changeset check was too permissive. The previous check failed only when .changeset/ was empty, so any pending unreleased changeset let every PR pass. That's how PRs chore: regenerate schemas from OpenAPI spec #153 and fix(schemas): pre-process spec to patch broken Error $refs #155 merged schema updates without adding changesets — and why the "Version Packages" PR (chore: version packages #152) doesn't reflect any of the schema work.
  • Tightened the check to diff the PR against its base and fail unless a new .changeset/*.md file is added. Escape hatch for opt-outs is npx changeset --empty.
  • Schema regeneration workflow now emits a changeset (minor bump) alongside src/schemas/ so future auto-regen PRs bump the version.

Test plan

  • Both workflow YAMLs parse via yaml.safe_load
  • Detection logic verified locally: git diff --diff-filter=A BASE...HEAD -- '.changeset/*.md' correctly lists the new file on this branch
  • npm run type-check passes
  • Changeset check job on this PR passes (confirming the new rule catches/allows itself correctly)

@benminer benminer requested a review from a team April 17, 2026 23:43
@benminer benminer force-pushed the feature/schema-changeset branch from 15f1d74 to 636e0ed Compare April 20, 2026 16:08
The changeset-check only verified that *some* changeset existed in
.changeset/. Any pending unreleased changeset let every subsequent PR
pass, so schema-regen PRs like #153 and #155 merged without adding a
changeset — leaving the release PR out of sync with the code. Compare
the PR diff against its base and fail unless a new .md file is added.

Also make the regenerate-schemas workflow emit a .changeset entry
alongside src/schemas/ so auto-generated schema PRs bump the version.
@benminer benminer force-pushed the feature/schema-changeset branch from 636e0ed to 68e2389 Compare April 24, 2026 15:20
@benminer benminer merged commit fc77e24 into main Apr 24, 2026
6 checks passed
@benminer benminer deleted the feature/schema-changeset branch April 24, 2026 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants