Skip to content

fix(ci): skip changeset-check on the version-packages PR#23

Merged
alerizzo merged 2 commits into
mainfrom
fix/changeset-check-skip-version-pr
Jun 26, 2026
Merged

fix(ci): skip changeset-check on the version-packages PR#23
alerizzo merged 2 commits into
mainfrom
fix/changeset-check-skip-version-pr

Conversation

@alerizzo

Copy link
Copy Markdown
Collaborator

Summary

  • The changesets bot's "chore: version packages" PR (branch changeset-release/main) consumes changesets — it deletes the .changeset/*.md files and bumps versions, adding none. The changeset-check job counts only added/modified changeset files (git diff --diff-filter=AM), so it always reported 0 and failed on that PR (most recently chore: version packages #22), even though the version PR is correct by construction.
  • Guard the job to run on normal PRs but skip the bot's version PR: github.head_ref != 'changeset-release/main'.

This is a CI-only change, so the changeset is empty (no version bump).

Test plan

  • On this PR, changeset-check runs and passes (it's a normal PR with a changeset).
  • On the next auto-generated "chore: version packages" PR, changeset-check is skipped instead of failing red.

🤖 Generated with Claude Code

The changesets bot's "chore: version packages" PR (branch
changeset-release/main) consumes changesets — it deletes the .md files
and bumps versions, adding none. The changeset-check job counts only
added/modified .changeset/*.md files (--diff-filter=AM), so it always
reported 0 and failed on that PR (e.g. #22), even though the PR is
correct by construction.

Guard the job so it runs for normal PRs but skips the bot's version PR:
`github.head_ref != 'changeset-release/main'`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 26, 2026 12:10

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request adds a changeset markdown file explaining an internal CI change to skip the changeset-check job on the changesets bot's "version packages" PR. However, the actual CI workflow file changes are missing from the pull request, leaving the implementation incomplete.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +4 to +7
Internal CI change (no version bump): skip the `changeset-check` job on the
changesets bot's "version packages" PR (`changeset-release/main`). That PR
consumes (deletes) changesets rather than adding them, so the check counted 0
added/modified changeset files and always failed.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

The actual CI workflow file changes (such as adding the github.head_ref != 'changeset-release/main' guard) are missing from this pull request. Currently, the only modified file is this changeset markdown file. Please commit and push the workflow changes to this branch to complete the implementation.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This looks like a misread — the workflow change is included. The PR touches 2 files: .github/workflows/ci.yml (adds the changeset-check guard) and this changeset. You can see it in the diff, and the changeset-check job is already passing green on this PR. No action needed.

🤖 Generated by /pr-fixup command

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the CI workflow to avoid running the changeset-check job on the Changesets bot’s auto-generated “chore: version packages” pull requests (branch changeset-release/main), where changesets are consumed rather than added.

Changes:

  • Skip changeset-check when the PR head branch is changeset-release/main.
  • Add an empty changeset documenting the CI-only behavior change.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
.github/workflows/ci.yml Adds a job-level if: guard to skip changeset-check on the Changesets release PR branch.
.changeset/skip-changeset-check-on-version-pr.md Empty changeset describing the internal CI change (no version bump).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

@codacy-production codacy-production Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

The PR successfully addresses the requirement to skip the changeset-check job on automated versioning PRs, preventing false failures. Codacy analysis indicates the changes are up to standards. The primary technical recommendation is to generalize the branch check to ensure compatibility with multi-branch release strategies, as the current implementation is restricted to the 'main' branch.

Test suggestions

  • Verify changeset-check job is skipped when github.head_ref is 'changeset-release/main'
  • Verify changeset-check job executes when github.head_ref is not 'changeset-release/main'
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Verify `changeset-check` job is skipped when `github.head_ref` is 'changeset-release/main'
2. Verify `changeset-check` job executes when `github.head_ref` is not 'changeset-release/main'

TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback

Comment thread .github/workflows/ci.yml Outdated
if: github.event_name == 'pull_request'
# Skip the changesets bot's "version packages" PR: it consumes (deletes)
# changesets rather than adding them, so it would always fail this check.
if: github.event_name == 'pull_request' && github.head_ref != 'changeset-release/main'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 MEDIUM RISK

Suggestion: The branch name check is restricted to 'main'. If you use other base branches for releases, this check will fail. Using a prefix check handles all release branches.

Suggested change
if: github.event_name == 'pull_request' && github.head_ref != 'changeset-release/main'
if: github.event_name == 'pull_request' && !startsWith(github.head_ref, 'changeset-release/')

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Good call — adopted. Switched to !startsWith(github.head_ref, 'changeset-release/') so it covers the bot's branch for any base branch, not just main.

🤖 Generated by /pr-fixup command

Per review (Codacy): the changesets bot branches as
changeset-release/<baseBranch>, so use
!startsWith(github.head_ref, 'changeset-release/') instead of an exact
match on 'changeset-release/main'. Same behavior for this repo today,
but robust to other base branches.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@alerizzo alerizzo merged commit d813bb6 into main Jun 26, 2026
4 checks passed
@alerizzo alerizzo deleted the fix/changeset-check-skip-version-pr branch June 26, 2026 14:19
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