Skip to content

fix: skip Claude PR review for bot-initiated PRs instead of erroring#2035

Merged
nick-inkeep merged 1 commit intomainfrom
fix/skip-bot-pr-review
Feb 16, 2026
Merged

fix: skip Claude PR review for bot-initiated PRs instead of erroring#2035
nick-inkeep merged 1 commit intomainfrom
fix/skip-bot-pr-review

Conversation

@nick-inkeep
Copy link
Collaborator

Summary

  • Add github.event.sender.type != 'Bot' to the pull_request job condition in claude-code-review.yml
  • Bot-initiated PRs (e.g. from inkeep, dependabot) now show as skipped (neutral) instead of failed (red X)
  • Human reviewers can still trigger reviews on bot PRs via @claude --review comments (the issue_comment path is unchanged)

Context

Bot PRs like #2034 were failing because claude-code-action rejects non-human actors not in allowed_bots, causing noisy red X check failures.

Test plan

  • Verify this PR's own Claude PR Review check is skipped (it was triggered by a human, so it should run normally — but confirms YAML is valid)
  • Next bot-initiated PR should show "skipped" instead of "failed"

🤖 Generated with Claude Code

Bot-initiated PRs (e.g. from `inkeep`, `dependabot`) caused the
claude-code-action step to fail with exit code 1, showing a red X on
the PR checks. Add `github.event.sender.type != 'Bot'` to the job's
`if` condition so bot PRs are skipped (neutral) instead of failed.

Human reviewers can still trigger reviews on bot PRs via `@claude --review`.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Feb 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agents-api Building Building Preview, Comment Feb 16, 2026 9:12am
agents-docs Building Building Preview, Comment Feb 16, 2026 9:12am
agents-manage-ui Building Building Preview, Comment Feb 16, 2026 9:12am

Request Review

@changeset-bot
Copy link

changeset-bot bot commented Feb 16, 2026

⚠️ No Changeset found

Latest commit: a55a481

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

Copy link
Contributor

@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.

PR Review Summary

(0) Total Issues | Risk: Low

Analysis

This PR adds github.event.sender.type != 'Bot' to the pull_request job condition in claude-code-review.yml, causing bot-initiated PRs to be skipped (neutral status) rather than failing when claude-code-action rejects non-human actors.

DevOps validation confirms:

  • Correct API usagegithub.event.sender.type is the canonical property for distinguishing Bot vs User actors on pull_request events
  • Consistent with existing patterns — the issue_comment branch already filters bots via !contains(github.actor, '[bot]'), using the appropriate property for that event type
  • No permission changes — the existing least-privilege permissions block is preserved
  • No action pinning changes — SHA-pinned claude-code-action remains unchanged
  • No documentation drift — this operational detail doesn't require contributor-facing docs updates

The implementation is correct, minimal, and addresses the stated problem (noisy red X failures on bot PRs like #2034).


✅ APPROVE

Summary: Clean 1-line fix that properly uses GitHub's event payload to skip automated reviews for bot-initiated PRs. The change is correct, consistent with existing patterns, and has no side effects. Ship it! 🚀


Reviewers (1)
Reviewer Returned Main Findings Consider While You're Here Inline Comments Pending Recs Discarded
pr-review-devops 4 0 0 0 0 0 0
Total 4 0 0 0 0 0 0

Note: All 4 returned findings were positive validations (INFO severity) confirming correctness, not issues or suggestions.

@github-actions github-actions bot deleted a comment from claude bot Feb 16, 2026
dimaMachina pushed a commit that referenced this pull request Feb 19, 2026
…2035)

Bot-initiated PRs (e.g. from `inkeep`, `dependabot`) caused the
claude-code-action step to fail with exit code 1, showing a red X on
the PR checks. Add `github.event.sender.type != 'Bot'` to the job's
`if` condition so bot PRs are skipped (neutral) instead of failed.

Human reviewers can still trigger reviews on bot PRs via `@claude --review`.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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

Comments