-
Notifications
You must be signed in to change notification settings - Fork 0
Add Claude Code GitHub Workflow #2
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
Reviewer's GuideThis PR adds two GitHub Actions workflows to integrate Claude Code into the repo: one automates pull request reviews with a customizable prompt, and the other triggers Claude on issue and review comments via @claude mentions. Both workflows define event triggers, permissions, checkout steps, and invoke the anthropics/claude-code-action with configurable options. Sequence diagram for @claude mention workflow triggersequenceDiagram
actor User
participant GitHub
participant Workflow as "claude.yml Workflow"
participant Runner as "GitHub Actions Runner"
participant ClaudeAction as "Claude Code Action"
participant ClaudeAPI as "Anthropic API (Claude)"
User->>GitHub: Create comment with @claude
GitHub->>Workflow: Trigger workflow (claude.yml)
Workflow->>Runner: Start job
Runner->>ClaudeAction: Run anthropics/claude-code-action
ClaudeAction->>ClaudeAPI: Send context and request
ClaudeAPI-->>ClaudeAction: Return response
ClaudeAction->>GitHub: Post comment/commit with results
Sequence diagram for automated Claude PR review workflowsequenceDiagram
participant GitHub
participant Workflow as "claude-code-review.yml Workflow"
participant Runner as "GitHub Actions Runner"
participant ClaudeAction as "Claude Code Action"
participant ClaudeAPI as "Anthropic API (Claude)"
GitHub->>Workflow: PR opened or synchronized
Workflow->>Runner: Start job
Runner->>ClaudeAction: Run anthropics/claude-code-action with review prompt
ClaudeAction->>ClaudeAPI: Send PR context and review prompt
ClaudeAPI-->>ClaudeAction: Return review feedback
ClaudeAction->>GitHub: Post review comment on PR
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Claude finished @ozzy2438's task —— View job Code Review Complete ✅I've thoroughly reviewed both Claude Code workflow files. Here's my comprehensive feedback: Todo List:
🔒 Security ReviewStrengths:
Concerns & Recommendations:
🏗️ Code Quality & Best PracticesStrengths:
Minor Improvements:
🐛 Potential Issues
⚡ Performance ConsiderationsOptimizations in place:
Recommendations:
🧪 Test CoverageCurrent State: No test coverage for the workflows themselves Recommendations:
📋 Additional Recommendations
🎯 SummaryThe workflows are well-structured and follow GitHub Actions best practices. The main concerns are around version pinning for security and stability. The code quality is high with excellent documentation. Priority Actions:
Overall, this is a solid implementation that will provide good Claude Code integration for your repository! 🚀 |
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.
Hey @ozzy2438 - I've reviewed your changes - here's some feedback:
- Add conditional path filters to the workflows (e.g. only trigger on
.ts,.js, etc.) to avoid unnecessary runs on non-code or documentation changes. - Incorporate skip conditions (like draft PR checks or
[skip-review]labels) in yourifstatements to prevent accidental or work-in-progress triggers. - Consider consolidating the two workflows into a single parameterized workflow file to reduce duplication and simplify long-term maintenance.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Add conditional path filters to the workflows (e.g. only trigger on `.ts`, `.js`, etc.) to avoid unnecessary runs on non-code or documentation changes.
- Incorporate skip conditions (like draft PR checks or `[skip-review]` labels) in your `if` statements to prevent accidental or work-in-progress triggers.
- Consider consolidating the two workflows into a single parameterized workflow file to reduce duplication and simplify long-term maintenance.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
🤖 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 Sourcery
Integrate the Claude Code GitHub App by adding two workflows: one for automated review of pull requests and another for interactive AI actions when @claude is mentioned, with secure token storage and scoped permissions.
New Features: