Skip to content

ci(validate): skip changeset-check on release PRs#25

Merged
lifebugz merged 1 commit into
mainfrom
ci/skip-changeset-check-on-release-prs
May 21, 2026
Merged

ci(validate): skip changeset-check on release PRs#25
lifebugz merged 1 commit into
mainfrom
ci/skip-changeset-check-on-release-prs

Conversation

@lifebugz
Copy link
Copy Markdown
Owner

Summary

Surfaced by the release-flow verification in PR #23: the `changeset-check` job in `validate.yml` fails on release PRs because it expects to find a new changeset added by the branch, but release PRs (the ones opened by `changesets/action`) DELETE changesets — they have nothing to report.

This was masked until today because prior release PRs (#15, #21) either merged before branch protection existed or were admin-overridden. PR #24 is the first release PR that actually had its CI scrutinized.

Fix

Add a head-ref exclusion so `changeset-check` skips on PRs from `changeset-release/main` (the canonical branch name `changesets/action` uses):

```diff
changeset-check:

  • if: github.event_name == 'pull_request'
  • if: github.event_name == 'pull_request' && github.head_ref != 'changeset-release/main'
    ```

Why this is safe

  • Skipped jobs satisfy required status checks in GitHub's branch protection (this has been the case since 2022).
  • Release PRs are constructed mechanically by `changesets/action` from already-validated changesets; re-validating "is there a changeset" on them adds no signal.
  • Human PRs still hit `changeset-check` — the rule is unchanged for the case it's meant to enforce.

Test plan

  • Empty changeset present
  • Post-merge: trigger PR chore(release): version packages #24 to re-check (close+reopen), confirm changeset-check is now reported as skipped, validate passes, PR mergeable through standard flow

Follow-up

After this PR merges, PR #24 needs a check re-trigger to pick up the new workflow. Close+reopen does it.

The changeset-check job runs `bunx changeset status --since=origin/main`
which looks for NEW changesets added in the branch. Release PRs (the
ones opened by changesets/action) DELETE changesets rather than adding
them — they have nothing to report and the check fails.

Skip the job when the head ref is `changeset-release/main` (the canonical
branch name changesets/action uses). Skipped jobs satisfy required
status checks in GitHub's branch protection (since 2022), so the
release PR can merge through standard CI rather than admin override.

Empty changeset (CI config, no package impact).
@lifebugz lifebugz merged commit 6a58ad8 into main May 21, 2026
2 checks passed
@lifebugz lifebugz deleted the ci/skip-changeset-check-on-release-prs branch May 21, 2026 18:58
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.

1 participant