🪴 [claude] Add Claude Code GitHub Workflow#12
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds GitHub Actions workflows to integrate Claude Code AI assistant into the repository. The integration enables automated code review and on-demand AI assistance through GitHub comments.
Key Changes:
- Adds workflow for interactive Claude mentions in PR/issue comments
- Adds automated Claude code review workflow for all new PRs
- Configures secure authentication using GitHub secrets
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| .github/workflows/claude.yml | Workflow triggered by @claude mentions in comments to run Claude Code agent with repository access |
| .github/workflows/claude-code-review.yml | Automated workflow that runs Claude code reviews on PR open/update events |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
|
||
| - name: Run Claude Code | ||
| id: claude | ||
| uses: anthropics/claude-code-action@v1 |
There was a problem hiding this comment.
Using @v1 pins to a major version which may introduce breaking changes automatically. Consider pinning to a specific commit SHA or minor version (e.g., @v1.0.0) for more stability and predictable behavior.
| uses: anthropics/claude-code-action@v1 | |
| uses: anthropics/claude-code-action@v1.0.0 |
|
|
||
| - name: Run Claude Code Review | ||
| id: claude-review | ||
| uses: anthropics/claude-code-action@v1 |
There was a problem hiding this comment.
Using @v1 pins to a major version which may introduce breaking changes automatically. Consider pinning to a specific commit SHA or minor version (e.g., @v1.0.0) for more stability and predictable behavior.
| uses: anthropics/claude-code-action@v1 | |
| uses: anthropics/claude-code-action@v1.0.0 |
| pull-requests: read | ||
| issues: read |
There was a problem hiding this comment.
The workflow lacks write permissions for pull-requests and issues, which may prevent Claude from posting comments or creating branches/commits as described in the PR description. Consider adding 'pull-requests: write' and 'issues: write' permissions.
| pull-requests: read | |
| issues: read | |
| pull-requests: write | |
| issues: write |
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| pull-requests: read |
There was a problem hiding this comment.
The workflow lacks write permissions for pull-requests, which will prevent Claude from posting review comments as intended by line 52. Add 'pull-requests: write' permission to enable comment posting.
| pull-requests: read | |
| pull-requests: write |
🤖 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!