-
Notifications
You must be signed in to change notification settings - Fork 6
Add Claude Code GitHub Workflow #44
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
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 adds GitHub Actions workflows to enable Claude Code integration, allowing team members to interact with Claude AI in pull requests and issues. The integration provides two workflows: one for on-demand Claude interactions via @claude mentions, and another for automatic code reviews on all pull requests.
Key Changes:
- Added workflow for triggering Claude via @claude mentions in comments
- Added workflow for automatic Claude code reviews on PRs
- Both workflows use the anthropics/claude-code-action@v1 with repository secrets for authentication
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
.github/workflows/claude.yml |
Implements on-demand Claude interactions triggered by @claude mentions in PR/issue comments |
.github/workflows/claude-code-review.yml |
Implements automatic Claude code reviews on opened and synchronized PRs |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| contents: read | ||
| pull-requests: read | ||
| issues: read |
Copilot
AI
Oct 26, 2025
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.
The workflow requires write permissions to create comments, branches, and commits as mentioned in the PR description, but only read permissions are granted. Add 'contents: write', 'pull-requests: write', and 'issues: write' to enable Claude to perform the described functionality.
| contents: read | |
| pull-requests: read | |
| issues: read | |
| contents: write | |
| pull-requests: write | |
| issues: write |
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| pull-requests: read |
Copilot
AI
Oct 26, 2025
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.
The workflow needs write permissions for Claude to post review comments on PRs (as indicated by the 'gh pr comment' command in line 52), but only read permissions are granted. Add 'pull-requests: write' to allow comment creation.
| pull-requests: read | |
| pull-requests: write |
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 1 |
Copilot
AI
Oct 26, 2025
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.
[nitpick] Using 'fetch-depth: 1' creates a shallow clone which may limit Claude's ability to analyze code history or context. Consider using 'fetch-depth: 0' or removing this parameter to allow full repository access when needed.
| fetch-depth: 1 | |
| fetch-depth: 0 |
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 1 |
Copilot
AI
Oct 26, 2025
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.
[nitpick] Using 'fetch-depth: 1' creates a shallow clone which may limit Claude's ability to analyze code history or compare changes across commits. Consider using 'fetch-depth: 0' or removing this parameter for more comprehensive code review capabilities.
| fetch-depth: 1 | |
| fetch-depth: 0 |
Code Review: Add Claude Code GitHub WorkflowThanks for implementing this integration! I've reviewed the PR and here's my feedback: ✅ Strengths1. Security Implementation
2. Architecture & Design
3. Documentation
📝 Suggestions for Improvement1. Consider Adding Write Permissions for Code Review Workflow The claude-code-review.yml workflow might benefit from additional permissions to enable more interactive reviews. Change line 24 from pull-requests: read to pull-requests: write. This would allow Claude to post review comments directly on code lines and suggest changes. 2. Project-Specific Tool Allowances For a Spring Boot project, consider adding project-specific testing and build tools like ./gradlew test, ./gradlew bootJar, etc. This aligns with the CLAUDE.md guidance. 3. Add Path Filtering for Code Review Consider filtering to only run on Java/config file changes (src/**/*.java, build.gradle, etc.) to reduce unnecessary runs.
|
🤖 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!