fix: skip Claude PR review for bot-initiated PRs instead of erroring#2035
fix: skip Claude PR review for bot-initiated PRs instead of erroring#2035nick-inkeep merged 1 commit intomainfrom
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
There was a problem hiding this comment.
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 usage —
github.event.sender.typeis the canonical property for distinguishing Bot vs User actors onpull_requestevents - ✅ Consistent with existing patterns — the
issue_commentbranch 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-actionremains 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.
…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>
Summary
github.event.sender.type != 'Bot'to thepull_requestjob condition inclaude-code-review.ymlinkeep,dependabot) now show as skipped (neutral) instead of failed (red X)@claude --reviewcomments (theissue_commentpath is unchanged)Context
Bot PRs like #2034 were failing because
claude-code-actionrejects non-human actors not inallowed_bots, causing noisy red X check failures.Test plan
🤖 Generated with Claude Code