Add Claude Code GitHub Workflow - #5
Conversation
There was a problem hiding this comment.
Hi @uelkerd! 👋
Your private repo does not have access to Sourcery.
Please upgrade to continue using Sourcery ✨
|
Note Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported. |
WalkthroughAdds two GitHub Actions workflows: one auto-runs Claude-based code review on pull_request events; the other listens for “@claude” mentions on issues and reviews to run Claude Code. Both use anthropics/claude-code-action@v1, require CLAUDE_CODE_OAUTH_TOKEN, and operate with scoped read permissions and id-token write. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Dev as Developer
participant GH as GitHub
participant R as Actions Runner
participant CA as Claude Code Action
participant CLI as gh CLI
participant PR as Pull Request
Dev->>GH: Open/Synchronize PR
GH-->>R: Trigger workflow (claude-code-review)
R->>R: Checkout (fetch-depth: 1)
R->>CA: Run anthropics/claude-code-action@v1<br/>with CLAUDE_CODE_OAUTH_TOKEN
CA-->>R: Analysis output (review notes)
R->>CLI: gh pr comment --body "<review>"
CLI-->>PR: Post review comment
note over R,CA: Permissions: contents/pull-requests/issues: read<br/>id-token: write
sequenceDiagram
autonumber
actor User as User
participant GH as GitHub
participant R as Actions Runner
participant CA as Claude Code Action
participant CLI as gh CLI
participant TI as Issue/PR Thread
User->>GH: Add comment/review/issue
GH-->>R: Trigger workflow (claude)
R->>R: if body/title contains "@claude"
alt contains "@claude"
R->>R: Checkout (fetch-depth: 1)
R->>CA: Run anthropics/claude-code-action@v1<br/>with actions: read
CA-->>R: Response content
R->>CLI: gh ... comment --body "<response>"
CLI-->>TI: Post reply
else no mention
R-->>GH: Skip job
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Free 📒 Files selected for processing (2)
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
🤖 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 CodeRabbit
New Features
Chores