-
Notifications
You must be signed in to change notification settings - Fork 1
Add Claude Code GitHub Workflow #46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Note Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported. |
📝 WalkthroughWalkthroughA new GitHub Actions workflow configuration file is added to automate the invocation of the "Claude Code" GitHub Action when specific GitHub events occur and the "@claude" mention is detected in comments or issues. Changes
Sequence Diagram(s)sequenceDiagram
participant GitHub User
participant GitHub Events
participant Workflow Runner
participant Claude Code Action
GitHub User->>GitHub Events: Create comment/issue/PR review (with "@claude")
GitHub Events->>Workflow Runner: Trigger workflow if "@claude" detected
Workflow Runner->>Claude Code Action: Execute action with API key
Claude Code Action-->>Workflow Runner: Process and respond
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (2)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
|
Changelog updates: 🔄 2025-05-23 *Added
|
PR Code Suggestions ✨Latest suggestions up to 97eb40a
Previous suggestions✅ Suggestions up to commit af7cae1
|
||||||||||||||||||
|
Manual-approval option for PR-Agent is disabled. You can enable it via a configuration file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a GitHub Actions workflow to enable the Claude Code AI integration by triggering on various comment and review events when @claude is mentioned.
- Creates a
claude.ymlworkflow that listens for issue comments, PR review comments, PR reviews, and issue open/assign events containing@claude. - Defines a job that checks out the repository and runs the
anthropics/claude-code-action@beta. - Sets permissions and secrets needed for the action to execute.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #46 +/- ##
===========================================
Coverage 100.00% 100.00%
Complexity 33 33
===========================================
Files 1 1
Lines 81 81
===========================================
Hits 81 81 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (3)
.github/workflows/claude.yml (3)
4-11: Refine event triggers for clarity
The workflow triggers onissues.assigned, but assignment rarely includes@claude. Consider removing or documenting why you need theassignedevent to avoid unexpected runs.
15-19: Streamline theifcondition
The multi-line expression covers all comment and issue events, but you can collapse common checks (e.g.contains(github.event.comment.body, '@claude')) to reduce duplication and improve readability.
27-31: Enhance checkout security
To enforce immutable inputs and prevent token leakage, addpersist-credentials: falseunless the checkout step explicitly needsGITHUB_TOKENfor downstream operations.- uses: actions/checkout@v4 with: fetch-depth: 1 + persist-credentials: false
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/claude.yml(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: guardrails/scan
- GitHub Check: Codacy Static Code Analysis
🔇 Additional comments (1)
.github/workflows/claude.yml (1)
32-36: Verify secret configuration
EnsureANTHROPIC_API_KEYis defined in your repository secrets and scoped to authorized collaborators only.
- Change pull-requests and issues permissions from read to write to allow Claude to respond - Add user restriction to only allow MarjovanLier to trigger Claude - Add repository check to prevent workflow tampering from forks - Prevent unauthorized API usage and costs 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
|
Changelog updates: 🔄 2025-05-23 *Added
|
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
|
Manual-approval option for PR-Agent is disabled. You can enable it via a configuration file |
|
@claude If you're being triggered, what do you think of this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a GitHub Actions workflow to integrate the Claude Code AI assistant into the repository.
- Adds a workflow triggered by issue comments, pull request review comments, pull request reviews, and issues that mention @claude.
- Includes security restrictions through actor and repository checks, and appropriate permission settings.
User description
🤖 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 documentation.
After merging this PR, let's try mentioning @claude in a comment on any PR to get started!
PR Type
enhancement, configuration changes
Description
Add GitHub Actions workflow to integrate Claude Code AI assistant
Restrict workflow execution to specific user and repository
Grant write permissions for pull requests and issues to enable Claude responses
Securely use Anthropic API key from GitHub secrets
Changes walkthrough 📝
claude.yml
Add and secure Claude Code GitHub Actions workflow.github/workflows/claude.yml
Summary by CodeRabbit