Skip to content

fix(ci): scope Scenario B review to cursor[bot] PRs only#33

Merged
citron (lcandy2) merged 1 commit into
mainfrom
cursor/scope-review-to-agent-prs
May 31, 2026
Merged

fix(ci): scope Scenario B review to cursor[bot] PRs only#33
citron (lcandy2) merged 1 commit into
mainfrom
cursor/scope-review-to-agent-prs

Conversation

@lcandy2

@lcandy2 citron (lcandy2) commented May 31, 2026

Copy link
Copy Markdown
Member

Why

Follow-up to #32. With allowed_bots: "*" now in place, the issue_comment trigger branch would fire on any PR that receives a CodeRabbit/Copilot comment — it never checked who authored the PR. That means a bot comment on a human-authored PR (like the infra PRs #32 / this one) would spin up the review agent to "address bot feedback" on a PR that isn't part of the agent flow.

Confirmed live: run 26716176970 triggered Scenario B on PR #32 (authored by lcandy2) off CodeRabbit's comment — it only failed because of the (now-removed) bot guard.

Fix

Add github.event.issue.user.login == 'cursor[bot]' to the issue_comment condition, matching the pull_request_review branch which already scopes to cursor[bot] authors. Now Scenario B only runs on agent-generated PRs.

Note

This PR is itself a human-authored infra PR — after merge, CodeRabbit comments on it will correctly be ignored by the review workflow.

Made with Cursor


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag @codesmith with what you need. Autofix is disabled.

Summary by CodeRabbit

  • Chores
    • Updated automated PR review workflow configuration to refine bot-driven automation triggers, improving internal review process efficiency with no impact to user-facing functionality.

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.
Copilot AI review requested due to automatic review settings May 31, 2026 15:16
@coderabbitai

coderabbitai Bot commented May 31, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 0ee335d8-d19c-4ed2-8009-416f49640c9c

📥 Commits

Reviewing files that changed from the base of the PR and between ae27fa2 and f103d67.

📒 Files selected for processing (1)
  • .github/workflows/cli-pr-review.yml

📝 Walkthrough

Walkthrough

The PR refines GitHub Actions workflow automation by adding an explicit check that the referenced issue author is cursor[bot] to the job-level if: condition for the issue_comment event trigger. This prevents the bot-driven review workflow from running when cursor-authored comments reference issues/PRs authored by other actors.

Changes

Workflow Trigger Gate

Layer / File(s) Summary
Issue author validation in workflow trigger
.github/workflows/cli-pr-review.yml
The issue_comment job condition is updated to require github.event.issue.user.login == 'cursor[bot]' alongside existing comment user checks, narrowing when the automation executes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

  • photon-hq/cli#32: Also updates .github/workflows/cli-pr-review.yml to adjust bot event handling; this PR tightens issue author validation while the other loosens allowed bot restrictions.

Poem

A rabbit fixed the gate with care, 🐰
One line to check who's really there,
Cursor-authored, nothing more—
The workflow guards its sacred door.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description explains the why, fix, and context, but does not follow the required template with sections like Upstream version, Routes, Snapshots, and Dependencies. Follow the repository's PR description template by including all required sections (Upstream version, Routes, Snapshots, Dependencies, Checklist) or clarify why this template does not apply to workflow changes.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding a scope condition to Scenario B review workflow to restrict it to cursor[bot] PRs only.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cursor/scope-review-to-agent-prs

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

Copy link
Copy Markdown

Agent PR Review

Scenario: B — Bot feedback (coderabbitai)
Verdict: ✅ Approve — no action needed

What's right

  • This PR is a human-authored infra fix (author: lcandy2), not an agent-generated PR. The diff is a single line that adds github.event.issue.user.login == 'cursor[bot]' to the issue_comment trigger condition in .github/workflows/cli-pr-review.yml, matching the existing pull_request_review branch.
  • Once merged, the Scenario B agent will correctly skip bot comments on human-authored PRs — including this very PR.

Concerns

  • None. The change is minimal, scoped, and addresses a real misfire confirmed by run 26716176970.

Fixes applied

  • None. CodeRabbit's only comment is the auto-generated "review in progress" placeholder — there are no inline comments (/pulls/33/comments is empty) and no completed reviews (/pulls/33/reviews is empty). There is no bot feedback to triage.

Declined

  • N/A

Deferred

  • N/A

Final note

This run is the self-described misfire the PR itself fixes — the steward triggered on a human PR because the cursor[bot] author guard isn't in place yet. Merging this PR resolves the trigger. Not applying the bot-feedback:resolved label since this isn't part of the agent flow.

@lcandy2 citron (lcandy2) merged commit 1c7ebbf into main May 31, 2026
9 of 10 checks passed
@lcandy2 citron (lcandy2) deleted the cursor/scope-review-to-agent-prs branch May 31, 2026 15:18

Copilot AI 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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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