-
Notifications
You must be signed in to change notification settings - Fork 41
Add Claude Code GitHub Workflow #227
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 integrate Claude Code, an AI coding agent, into the repository. The integration enables automated code reviews and allows team members to invoke Claude by mentioning @claude in PR or issue comments.
Key Changes:
- Added workflow for @claude mentions in PRs and issues
- Added automatic code review workflow for new and updated PRs
- Configured permissions and security settings for Claude integration
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
.github/workflows/claude.yml |
Workflow triggered by @claude mentions in comments, issues, and reviews |
.github/workflows/claude-code-review.yml |
Automatic code review workflow for opened/synchronized PRs |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude'))) | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: 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 only has 'contents: read' permission but Claude may need 'contents: write' to create branches and commits as mentioned in the PR description. Verify that the current permissions align with Claude's intended capabilities.
| contents: read | |
| contents: write |
| # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md | ||
| # or https://docs.claude.com/en/docs/claude-code/cli-reference for available options | ||
| claude_args: '--allowed-tools "Bash(gh issue view:*),Bash(gh search:*),Bash(gh issue list:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr list:*)"' |
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 allowed tools don't include 'gh pr review' which would be more appropriate for submitting code reviews. Using 'gh pr comment' creates a regular comment rather than a formal review. Consider adding 'Bash(gh pr review:*)' to enable proper code review submissions.
| claude_args: '--allowed-tools "Bash(gh issue view:*),Bash(gh search:*),Bash(gh issue list:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr list:*)"' | |
| claude_args: '--allowed-tools "Bash(gh issue view:*),Bash(gh search:*),Bash(gh issue list:*),Bash(gh pr comment:*),Bash(gh pr review:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr list:*)"' |
| 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 has 'pull-requests: read' permission but Claude needs 'pull-requests: write' to post review comments as specified in the prompt on line 52. Without write permission, the 'gh pr comment' command will fail.
| pull-requests: read | |
| pull-requests: write |
Claude Code Review - PR #227Thank you for adding Claude Code integration to the SpringUserFramework repository! I've completed a thorough review of the GitHub Actions workflows. Here's my feedback: ✅ Strengths
🔍 Code Quality Assessmentclaude-code-review.yml (.github/workflows/claude-code-review.yml:1-57)
claude.yml (.github/workflows/claude.yml:1-50)
🛡️ Security ConsiderationsPositive Security Aspects:
Recommendations:
🐛 Potential IssuesMinor Issues:
⚡ Performance Considerations
🧪 Test CoverageN/A - These are workflow definitions without testable code logic. However: Recommended validation steps post-merge:
📋 Suggestions for Enhancement
📝 DocumentationThe PR description is excellent and covers:
Final Recommendation✅ APPROVE with minor suggested changes This is a solid implementation of Claude Code integration. The main issue to address before merging is updating the The workflows follow GitHub Actions best practices and include appropriate security measures. Great job documenting the feature in the PR description! Review performed by Claude Code - SpringUserFramework Code Review Agent |
🤖 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!