claude code integration#207
Conversation
|
CodeAnt AI is reviewing your PR. Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
Review Summary by QodoAdd Claude Code GitHub Actions workflow integration
WalkthroughsDescription• Adds GitHub Actions workflow for Claude Code integration • Triggers on issue comments, PR reviews, and issue events • Automatically invokes Claude Code action when @claude mentioned • Includes optional configuration for customization and permissions Diagramflowchart LR
GH["GitHub Events<br/>issue_comment, PR review, issues"]
TRIGGER["@claude trigger<br/>detection"]
ACTION["Claude Code<br/>Action"]
PERMS["Permissions<br/>contents, PRs, issues"]
GH -- "event filters" --> TRIGGER
TRIGGER -- "if condition met" --> ACTION
PERMS -- "grants access" --> ACTION
File Changes1. .github/workflows/claude.yml
|
Code Review by Qodo
1.
|
|
Warning Rate limit exceeded
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 40 minutes and 39 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the 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 configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughA new GitHub Actions workflow named "Claude Code" is added to automatically invoke Claude Code action on repository events (issue comments, pull request reviews, issues). The workflow triggers when Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
|
PR Summary: Add GitHub Actions workflow to run Claude Code (anthropics/claude-code-action) when @claude is mentioned in issues, comments, or PR reviews.
|
|
Reviewed up to commit:0c8656f3edb9d038328d59148cc710210635d1bd Additional SuggestionOthers- Add concurrency and de-duplication (concurrency: group + cancel-in-progress) to avoid multiple overlapping runs for the same PR/issue and reduce rate usage. Also consider rate-limiting/debouncing triggers (e.g., only run on created, not edited, or require a short cooldown) to avoid excessive invocations from rapid comments/edits.jobs:
claude:
concurrency:
group: claude-${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.event.issue.number || github.ref }}
cancel-in-progress: true |
|
CodeAnt AI finished reviewing your PR. |
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
.github/workflows/claude.yml (1)
49-49: Keep the commented install example deterministic.Even as commented guidance, this encourages
npm installin workflows. Usenpm cioryarn --frozen-lockfilein examples that may be copied into active workflow config.As per coding guidelines, “Always use --frozen-lockfile (yarn) or npm ci (npm) for deterministic dependency installs in workflows”.
♻️ Proposed example update
- # --allowedTools "Bash(npm install),Bash(npm run build),Bash(npm run test:*),Bash(npm run lint:*)" + # --allowedTools "Bash(npm ci),Bash(npm run build),Bash(npm run test:*),Bash(npm run lint:*)"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/claude.yml at line 49, Update the commented install example so it uses deterministic installs: replace the "npm install" token in the commented tools string (the line containing "--allowedTools \"Bash(npm install),...\"") with "npm ci" (or use "yarn --frozen-lockfile" if yarn is preferred) so the example encourages deterministic dependency installation in CI workflows.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/claude.yml:
- Around line 26-37: The workflow step using anthropics/claude-code-action@v1
(step id: claude, name: Run Claude Code) is passing the wrong input and missing
permissions; change the input key from anthropic_api_key to
claude_code_oauth_token to wire the OAuth secret correctly and add an
additional_permissions input set to actions: read so the action can access CI
results. Ensure you keep the same step id/name and only replace the input key
and add the additional_permissions field.
- Around line 29-35: The workflow uses mutable tags actions/checkout@v6 and
anthropics/claude-code-action@v1; replace those tag references with their
corresponding full 40-character commit SHAs to pin the actions immutably (e.g.,
change uses: actions/checkout@v6 -> uses: actions/checkout@<full-commit-sha> and
uses: anthropics/claude-code-action@v1 -> uses:
anthropics/claude-code-action@<full-commit-sha>), then verify the SHAs point to
the intended release commits and run the workflow to ensure no behavioural
changes.
- Around line 15-26: Add an author_association gate to the job condition so only
trusted users can trigger the workflow (check the existing if: condition and
require e.g. github.event.comment.author_association to be one of OWNER, MEMBER,
COLLABORATOR before granting permissions), replace the two action refs
actions/checkout@v6 and anthropics/claude-code-action@v1 with their pinned full
commit SHAs, and ensure the secret CLAUDE_CODE_OAUTH_TOKEN is only exposed when
the author_association check passes; also remove or fix the commented Bash
example that uses `npm install` (change to `npm ci` or remove the comment) to
comply with deterministic install guidelines.
---
Nitpick comments:
In @.github/workflows/claude.yml:
- Line 49: Update the commented install example so it uses deterministic
installs: replace the "npm install" token in the commented tools string (the
line containing "--allowedTools \"Bash(npm install),...\"") with "npm ci" (or
use "yarn --frozen-lockfile" if yarn is preferred) so the example encourages
deterministic dependency installation in CI workflows.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 56f27008-b4b5-4967-bebd-2a695257846b
📒 Files selected for processing (1)
.github/workflows/claude.yml
Configures claude-code-action to respond to @claude mentions on PR review comments and reviews, restricted to repo members/collaborators. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Filters issue_comment to only fire on PR conversation threads (github.event.issue.pull_request != null), not on issue comments. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
CodeAnt AI is running the review. Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
Sequence DiagramThis PR adds a GitHub Actions workflow that runs Claude Code when authorized users mention Claude in pull request comments or reviews, and posts automated responses back to the same thread. sequenceDiagram
participant Developer
participant GitHub
participant Workflow
participant ClaudeAction
participant ClaudeService
Developer->>GitHub: Add PR comment or review mentioning Claude
GitHub->>Workflow: Trigger Claude Code workflow on comment or review event
Workflow->>Workflow: Verify event is PR related and author is member or collaborator
alt Conditions met
Workflow->>ClaudeAction: Run claude code action with repo and secret token
ClaudeAction->>ClaudeService: Send code context and request assistance
ClaudeService-->>ClaudeAction: Return suggested reply or code review
ClaudeAction-->>GitHub: Post Claude response in PR thread
else Conditions not met
Workflow->>GitHub: Skip Claude automation
end
Generated by CodeAnt AI |
|
CodeAnt AI finished running the review. Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
|
CodeAnt AI is running the review. Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
Sequence DiagramThis PR adds a GitHub Actions workflow that listens for claude mentions in pull request comments and reviews from authorized collaborators, then runs the Claude Code action to post automated replies on the PR thread. sequenceDiagram
participant RepoMember
participant GitHub
participant ClaudeWorkflow
participant ClaudeCode
RepoMember->>GitHub: Comment on PR with claude mention
GitHub->>ClaudeWorkflow: Trigger comment or review workflow
ClaudeWorkflow->>ClaudeWorkflow: Check PR context and author permissions
ClaudeWorkflow->>ClaudeCode: Run Claude Code action
ClaudeCode-->>GitHub: Post AI reply to PR discussion
Generated by CodeAnt AI |
|
CodeAnt AI finished running the review. Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
User description
Summary by CodeRabbit
CodeAnt-AI Description
Add Claude Code responses to PR discussions
What Changed
@claudein PR review comments, review submissions, or PR conversation comments now starts Claude CodeImpact
✅ Faster PR follow-up✅ Fewer unwanted AI runs✅ Safer public-repo automation🔄 Retrigger CodeAnt AI Review
Details
💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.