fix(ci): allow bot actors in claude-code-action PR review#32
Conversation
…real agent PRs) claude-code-action@v1 refuses bot-initiated workflows by default: "Workflow initiated by non-human actor: cursor (type: Bot)." Every genuine agent-flow event is bot-initiated — cursor[bot] opens/ pushes the sync PR, coderabbitai[bot]/copilot post reviews — so the review step failed on PR #31 (and would on every future sync PR). The earlier "successful" run on PR #26 only passed because a human pushed that commit, masking the gap. The job-level `if:` already restricts which bots/events reach the action, so `allowed_bots: "*"` is safe and avoids double-gating.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe PR modifies the Claude code review workflow step in ChangesWorkflow Action Configuration
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
) The issue_comment branch of the review trigger matched ANY PR that got a coderabbitai/copilot comment — it never checked the PR author. Combined with the just-merged `allowed_bots: "*"`, a CodeRabbit comment on a human-authored PR (e.g. infra PR #32) would now spin up the review agent to "address bot feedback" on a PR that isn't part of the agent flow. Add `github.event.issue.user.login == 'cursor[bot]'` so Scenario B only fires on agent-generated PRs, matching the pull_request_review branch which already scopes to cursor[bot] authors.
Why
PR #31 (
feat: sync CLI with dashboard@v1.0.3, opened bycursor[bot]) triggered the review workflow, butclaude-code-action@v1failed with:Every genuine agent-flow event is bot-initiated:
cursor[bot]opens / pushes the sync PRcoderabbitai[bot]/copilot-pull-request-reviewer[bot]post reviewsSo the review step has effectively never run on a real agent PR. The earlier "successful" run on #26 only passed because a human (
lcandy2) pushed that commit, which sidestepped the action's bot guard.Fix
Add
allowed_bots: "*"to theclaude-code-actionstep. The job-levelif:already restricts which actors/events reach the action (onlycursor[bot],coderabbitai[bot],copilot-pull-request-reviewer[bot]), so"*"here just removes the redundant second gate rather than widening exposure.After merge
Re-trigger review on PR #31 to confirm Scenario A runs end-to-end.
Made with Cursor
Need help on this PR? Tag
@codesmithwith what you need. Autofix is disabled.Summary by CodeRabbit