Skip to content

fix(ci): only validate changesets when some are present - #1381

Merged
ryan-roemer merged 2 commits into
FormidableLabs:mainfrom
skazinka:fix/changeset-status-skip-when-no-changesets
Oct 27, 2026
Merged

ryan-roemer merged 2 commits into
FormidableLabs:mainfrom
skazinka:fix/changeset-status-skip-when-no-changesets

Conversation

@skazinka

Copy link
Copy Markdown
Contributor

Problem

The changeset status guard added in #1374 / #1377 does more than reject mixed changesets — changeset status also 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:

error Some packages have been changed but no changesets were found.

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:

if [ -n "$(find .changeset -maxdepth 1 -name '*.md' ! -name 'README.md' -print -quit)" ]; then
  git show-ref --verify --quiet refs/heads/main || git branch main origin/main
  pnpm changeset status
else
  echo "No changesets to validate."
fi
  • Mixed/malformed changesets are still caught — a bad changeset is a file, so the step runs and fails (verified locally).
  • The "Version Packages" PR is skipped — no changeset files present.
  • No presence enforcement — PRs without a changeset are no longer failed.

Verification

Locally, against the current main:

  • With the clean changeset present → step runs, changeset status passes (3 publishable packages).
  • With only config.json (+ README.md) present → step skips, as the Version Packages PR would.
  • With a planted mixed changeset → changeset status still errors.

🤖 Generated with Claude Code

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>
@changeset-bot

changeset-bot Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: a99a837

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel

vercel Bot commented Oct 27, 2026

Copy link
Copy Markdown

@skazinka is attempting to deploy a commit to the Nearform Team on Vercel.

A member of the Team first needs to authorize it.

Comment thread .github/workflows/ci.yml Outdated
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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have a README.md file in .changset

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair point, and probably reasonable to assume nobody's going to add one in there.

@ryan-roemer ryan-roemer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One fix, then rest LGTM.

@ryan-roemer
ryan-roemer merged commit c3a2f60 into FormidableLabs:main Oct 27, 2026
1 of 2 checks passed
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