Repository navigation
fix(ci): only validate changesets when some are present - #1381
ryan-roemer merged 2 commits into
Conversation
The changeset-status guard added in #1374 also enforces changeset *presence*: `changeset status` fails when a package changed with no covering changeset. That broke the automated "Version Packages" PR (#1378), whose whole job is to consume the changesets and bump versions, so it always has changed packages and no changesets left behind. Guard the step so it runs only when a changeset file is present. Mixed or malformed changesets are still caught (a bad changeset is a file, so the step runs and fails), but we no longer require every package-touching PR to include a changeset. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
|
@skazinka is attempting to deploy a commit to the Nearform Team on Vercel. A member of the Team first needs to authorize it. |
| run: | | ||
| git show-ref --verify --quiet refs/heads/main || git branch main origin/main | ||
| pnpm changeset status | ||
| if [ -n "$(find .changeset -maxdepth 1 -name '*.md' ! -name 'README.md' -print -quit)" ]; then |
There was a problem hiding this comment.
We don't have a README.md file in .changset
There was a problem hiding this comment.
Fair point, and probably reasonable to assume nobody's going to add one in there.
Problem
The
changeset statusguard added in #1374 / #1377 does more than reject mixed changesets —changeset statusalso enforces changeset presence, failing when a package has changed with no covering changeset.That broke the automated "Version Packages" PR (#1378): its entire purpose is to consume the changesets and bump versions, so it always has changed packages and no changesets left behind, and the check fails it every time with:
Presence enforcement was never the intent of #1374 (which was about a mixed changeset silently freezing releases), and we don't want to require a changeset on every package-touching PR.
Fix
Run the validation only when a changeset file is actually present:
Verification
Locally, against the current
main:changeset statuspasses (3 publishable packages).config.json(+README.md) present → step skips, as the Version Packages PR would.changeset statusstill errors.🤖 Generated with Claude Code