Skip to content

Auto-respond to all PR review comments without @claude mention#123

Merged
don-petry merged 1 commit into
mainfrom
auto-respond-pr-reviews
Apr 10, 2026
Merged

Auto-respond to all PR review comments without @claude mention#123
don-petry merged 1 commit into
mainfrom
auto-respond-pr-reviews

Conversation

@don-petry
Copy link
Copy Markdown
Contributor

Summary

  • Removed the contains(github.event.comment.body, '@claude') filter from the claude job's if condition
  • Claude now automatically responds to all issue comments and PR review comments from trusted contributors (OWNER, MEMBER, COLLABORATOR)
  • Added claude[bot] exclusion to prevent infinite feedback loops where Claude responds to its own comments

Motivation

When Claude creates PRs from issues (via the claude-issue job), reviewers currently have to explicitly mention @claude in their review comments for Claude to pick them up. This friction slows down the review cycle. With this change, Claude automatically addresses all review feedback from trusted contributors.

Test plan

  • Verify Claude responds to a PR review comment without @claude mention
  • Verify Claude does not trigger on its own comments (no infinite loop)
  • Verify the author_association check still restricts triggers to OWNER/MEMBER/COLLABORATOR
  • Verify the pull_request event trigger is unchanged

🤖 Generated with Claude Code

Instead of requiring reviewers to explicitly mention @claude, Claude now
responds to all issue comments and PR review comments from trusted
contributors (OWNER, MEMBER, COLLABORATOR). Added a claude[bot] exclusion
to prevent infinite feedback loops.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 10, 2026 01:28
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 10, 2026

Warning

Rate limit exceeded

@don-petry has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 4 minutes and 18 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 4 minutes and 18 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 2e6098e8-45c2-4f30-8d7f-633058dc467d

📥 Commits

Reviewing files that changed from the base of the PR and between 7bdbb81 and 7ad269c.

📒 Files selected for processing (1)
  • .github/workflows/claude-code-reusable.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch auto-respond-pr-reviews

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@sonarqubecloud
Copy link
Copy Markdown

@don-petry don-petry merged commit d01423d into main Apr 10, 2026
23 checks passed
@don-petry don-petry deleted the auto-respond-pr-reviews branch April 10, 2026 01:30
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the org-level reusable Claude Code workflow to trigger interactive Claude responses on trusted-contributor PR/issue comments without requiring an explicit @claude mention, while attempting to prevent bot self-reply loops.

Changes:

  • Removes the contains(..., '@claude') gating for issue_comment and pull_request_review_comment triggers.
  • Adds an exclusion for comments authored by claude[bot] to reduce the risk of self-trigger loops.
  • Updates the job header comment to reflect the new interactive trigger behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

(github.event_name == 'pull_request_review_comment' &&
contains(github.event.comment.body, '@claude') &&
github.event.comment.user.login != 'claude[bot]' &&
contains(fromJson('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association))
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

With the @claude mention gate removed, this job will now run much more frequently (potentially for every review comment from trusted users). The workflow currently has no concurrency configured for the claude job, so multiple comments in quick succession can start overlapping runs on the same PR, which can lead to conflicting pushes/comments and unnecessary compute/API usage. Consider adding a concurrency group keyed by PR number (or issue/PR number fallback) with cancel-in-progress: true to ensure only one interactive run per PR at a time.

Suggested change
contains(fromJson('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association))
contains(fromJson('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association))
concurrency:
group: ${{ format('claude-{0}', github.event.pull_request.number || github.event.issue.number || github.run_id) }}
cancel-in-progress: true

Copilot uses AI. Check for mistakes.
don-petry added a commit that referenced this pull request Apr 28, 2026
…ate-github check (#165)

The check incorrectly flagged petry-projects/.github/.github/workflows/ as invalid,
but this is the CORRECT pattern per GitHub's reusable workflow syntax:
- First .github = repository name
- Second .github/workflows = directory path within that repository

This check was producing false positives across all repos:
- petry-projects/TalkTerm (issues #131, #130, #129)
- petry-projects/broodly (issues #159, #158)
- petry-projects/google-app-scripts (issues #226, #225)
- petry-projects/ContentTwin (issues #111, #110)
- petry-projects/markets (issues #137, #136)
- petry-projects/bmad-bgreat-suite (issues #123, #122)

Disable the check to reduce compliance audit noise and prevent auto-issue creation
for valid patterns.

Co-authored-by: Claude Haiku 4.5 <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.

2 participants