Skip to content

ci: skip claude.yml when comment is '@claude review'#1737

Merged
felixweinberger merged 1 commit intomainfrom
fweinberger/exclude-claude-review-from-gha
Mar 24, 2026
Merged

ci: skip claude.yml when comment is '@claude review'#1737
felixweinberger merged 1 commit intomainfrom
fweinberger/exclude-claude-review-from-gha

Conversation

@felixweinberger
Copy link
Copy Markdown
Contributor

Excludes @claude review comments from triggering this workflow.

Motivation and Context

Comments starting with @claude review are handled by the hosted code-review webhook, which creates a dedicated "Claude Code Review" check run. When this GitHub Action also fires on the same comment, both systems respond — the GHA run then fails on fork PRs because it tries to fetch the fork branch from origin, leaving a red ❌ on the PR alongside the actual (successful) review.

How Has This Been Tested?

Observed the double-trigger on PR #1003: @claude review fired both the hosted webhook (check run started correctly) and this workflow (failed with git fetch origin <fork-branch>).

Breaking Changes

None.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

Only the issue_comment event is excluded since that's the only event type the hosted webhook listens to. @claude review in a PR review comment or issue body still triggers this workflow as before.

Comments starting with '@claude review' are handled by the hosted
code-review webhook, which creates a dedicated check run. Running this
workflow on the same trigger causes both systems to respond to one
comment — the GHA run then fails on fork PRs because it tries to fetch
the fork branch from origin.
@felixweinberger felixweinberger requested a review from a team as a code owner March 24, 2026 20:31
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 24, 2026

⚠️ No Changeset found

Latest commit: df96ba9

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

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 24, 2026

Open in StackBlitz

@modelcontextprotocol/client

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/client@1737

@modelcontextprotocol/server

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/server@1737

@modelcontextprotocol/express

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/express@1737

@modelcontextprotocol/hono

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/hono@1737

@modelcontextprotocol/node

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/node@1737

commit: df96ba9

@felixweinberger felixweinberger merged commit f9fda80 into main Mar 24, 2026
18 checks passed
@felixweinberger felixweinberger deleted the fweinberger/exclude-claude-review-from-gha branch March 24, 2026 20:33
Copy link
Copy Markdown

@claude claude bot left a comment

Choose a reason for hiding this comment

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

LGTM — straightforward CI condition to avoid double-triggering on @claude review comments.

Extended reasoning...

Overview

This PR modifies a single line in .github/workflows/claude.yml, adding a !startsWith guard to the issue_comment condition. This prevents the GitHub Action from firing when a separate hosted webhook already handles @claude review comments.

Security risks

None. This is a CI workflow condition change that only narrows when the workflow triggers. It does not alter permissions, secrets handling, or any runtime behavior.

Level of scrutiny

Minimal scrutiny needed. This is a one-line, mechanical change to a CI condition with clear motivation (preventing a double-trigger that causes spurious red checks on fork PRs). The logic is straightforward and easy to verify by inspection.

Other factors

No bugs were found. No outstanding reviewer comments. No changeset is needed since this is a CI-only change with no version impact. The PR description clearly explains the observed problem and the scoping decision (only issue_comment is excluded, not other event types).

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