Add Claude Code GitHub Action#81
Conversation
|
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 2 minutes and 27 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: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds a GitHub Actions workflow that triggers on pull request events and specific comment events, running the Claude Code action on an Ubuntu runner with repository read and PR/issue write permissions and using an Anthropic API key. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant GitHub as GitHub (Events)
participant Runner as Actions Runner (ubuntu-latest)
participant ClaudeAction as Claude Code Action
participant Anthropic as Anthropic API
GitHub->>Runner: trigger workflow (PR event or comment with `@claude`)
Runner->>ClaudeAction: start action with ANTHROPIC_API_KEY
ClaudeAction->>Anthropic: send request (analysis / code)
Anthropic-->>ClaudeAction: response (results)
ClaudeAction->>GitHub: post/write PR or issue comment (requires write permission)
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 6-7: Restrict the workflow trigger to PR comments only by updating
the issue_comment trigger: add a conditional check that ensures
github.event.issue.pull_request exists (so only PR issue comments proceed) and
also add a separate pull_request_review_comment trigger to catch PR review
comments; modify the issue_comment entry (symbol: issue_comment) to include the
conditional and add pull_request_review_comment to the triggers so the workflow
no longer runs for regular issue comments.
- Line 21: Replace the floating tag reference "anthropics/claude-code-action@v1"
with an immutable commit SHA for that action (e.g.,
"anthropics/claude-code-action@<commit-sha>") and add a trailing comment like "#
v1.0.79" to indicate which release the SHA corresponds to; update the workflow
line that currently contains uses: anthropics/claude-code-action@v1 to use the
exact SHA instead.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: e35eb6c5-ee5c-4e83-aa89-1910db711502
📒 Files selected for processing (1)
.github/workflows/claude.yml
There was a problem hiding this comment.
Pull request overview
Adds a new GitHub Actions workflow to run the Claude Code Action for automated PR review activity in this repository.
Changes:
- Introduces
.github/workflows/claude.ymlto runanthropics/claude-code-action@v1on PR open/reopen/sync. - Adds an
issue_commenttrigger to run when@claudeis mentioned in a comment. - Uses repository secret
ANTHROPIC_API_KEYfor authentication to Anthropic.
- Restrict issue_comment trigger to PR comments only - Add author-association check (OWNER/MEMBER/COLLABORATOR) - Add pull_request_review_comment trigger - Add timeout-minutes to prevent runaway jobs Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Pin claude-code-action to commit SHA for supply-chain safety - Add fork PR guard (secrets unavailable for fork PRs) - Scope pull_request trigger to main branch - Use >- folded scalar for if expression Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|



Summary
ANTHROPIC_API_KEYsecret to be configured in repo settingsSetup Required
ANTHROPIC_API_KEYas a repository secret (Settings → Secrets and variables → Actions)🤖 Generated with Claude Code
Summary by CodeRabbit