Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughTwo new GitHub Actions workflows are added to integrate Claude code review automation. The first workflow automatically triggers on pull request lifecycle events, while the second runs on comment mentions and review submissions when Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
2 issues found across 2 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name=".github/workflows/claude.yml">
<violation number="1" location=".github/workflows/claude.yml:9">
P2: Including `issues.assigned` causes repeated, non-mention-triggered Claude runs whenever assignees change on issues that already contain `@claude`.</violation>
<violation number="2" location=".github/workflows/claude.yml:16">
P1: The workflow can be triggered by `@claude` mentions without validating collaborator/write-level author association, allowing untrusted users to consume automation and secrets-backed API usage.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) || | ||
| (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) || | ||
| (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) || | ||
| (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude'))) |
There was a problem hiding this comment.
P1: The workflow can be triggered by @claude mentions without validating collaborator/write-level author association, allowing untrusted users to consume automation and secrets-backed API usage.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/claude.yml, line 16:
<comment>The workflow can be triggered by `@claude` mentions without validating collaborator/write-level author association, allowing untrusted users to consume automation and secrets-backed API usage.</comment>
<file context>
@@ -0,0 +1,50 @@
+jobs:
+ claude:
+ if: |
+ (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
+ (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
+ (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
</file context>
| (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) || | |
| (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) || | |
| (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) || | |
| (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude'))) | |
| (github.event_name == 'issue_comment' && contains(fromJson('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association) && contains(github.event.comment.body, '@claude')) || | |
| (github.event_name == 'pull_request_review_comment' && contains(fromJson('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association) && contains(github.event.comment.body, '@claude')) || | |
| (github.event_name == 'pull_request_review' && contains(fromJson('["OWNER","MEMBER","COLLABORATOR"]'), github.event.review.author_association) && contains(github.event.review.body, '@claude')) || | |
| (github.event_name == 'issues' && contains(fromJson('["OWNER","MEMBER","COLLABORATOR"]'), github.event.issue.author_association) && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude'))) |
| pull_request_review_comment: | ||
| types: [created] | ||
| issues: | ||
| types: [opened, assigned] |
There was a problem hiding this comment.
P2: Including issues.assigned causes repeated, non-mention-triggered Claude runs whenever assignees change on issues that already contain @claude.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/claude.yml, line 9:
<comment>Including `issues.assigned` causes repeated, non-mention-triggered Claude runs whenever assignees change on issues that already contain `@claude`.</comment>
<file context>
@@ -0,0 +1,50 @@
+ pull_request_review_comment:
+ types: [created]
+ issues:
+ types: [opened, assigned]
+ pull_request_review:
+ types: [submitted]
</file context>
| types: [opened, assigned] | |
| types: [opened] |
🤖 Installing Claude Code GitHub App
This PR adds a GitHub Actions workflow that enables Claude Code integration in our repository.
What is Claude Code?
Claude Code is an AI coding agent that can help with:
How it works
Once this PR is merged, we'll be able to interact with Claude by mentioning @claude in a pull request or issue comment.
Once the workflow is triggered, Claude will analyze the comment and surrounding context, and execute on the request in a GitHub action.
Important Notes
Security
There's more information in the Claude Code action repo.
After merging this PR, let's try mentioning @claude in a comment on any PR to get started!
Summary by cubic
Adds GitHub Actions to integrate Claude Code. Supports
@claudecommands in issues/PRs and runs automatic code reviews on PR updates.New Features
claude.yml: Triggers on comments or reviews containing@claude; runsanthropics/claude-code-action@v1with minimal read permissions andactions: readto read CI.claude-code-review.yml: Runs on PR open/sync/ready/reopen; invokes the code review plugin with a prompt targeting the current PR.Migration
CLAUDE_CODE_OAUTH_TOKENsecret in repository settings.Written for commit b16db53. Summary will update on new commits.
Summary by CodeRabbit