Add Claude Code GitHub Workflow - #8
Conversation
donny-son
left a comment
There was a problem hiding this comment.
👀 Code Review - Claude Code Integration
Clean and well-structured setup for Claude Code GitHub Actions.
What's Good
- Security-conscious permissions: Read-only defaults with
id-token: writefor OIDC auth - Two complementary workflows:
claude.ymlfor @claude mentions (interactive)claude-code-review.ymlfor auto-review on PRs
- Sensible triggers: Code review runs on relevant PR events; mention-based workflow has proper
contains()checks
Suggestions (optional)
-
Code Review Workflow Permissions: Currently has read-only
pull-requests: read. Addpull-requests: writeif you want Claude to post review comments directly. -
Allowed Tools: Consider adding project-specific tools:
allowed_tools: Bash(npm install),Bash(npm run build),Bash(npm run lint)
-
Concurrency: Prevent duplicate runs:
concurrency: group: claude-${{ github.event.pull_request.number || github.event.issue.number }} cancel-in-progress: true
Looks good! 🚀
donny-son
left a comment
There was a problem hiding this comment.
Joan's Quick Review 🥟
Solid Claude Code integration! The setup follows best practices.
Already noted by Donny (great self-review 👍):
- pull-requests: write needed for auto-commenting
- concurrency to prevent duplicate runs
One additional note:
- Consider adding
contents: writeif Claude should be able to push commits (e.g., auto-fix suggestions)
Clean PR, ready to merge once permissions are adjusted! ✨
donny-son
left a comment
There was a problem hiding this comment.
Code Review: Claude Code GitHub Workflow 🤖
Great addition! This sets up Claude Code integration properly. A few observations:
✅ What looks good
- Security: OAuth token stored as secret, not hardcoded
- Permissions: Minimal necessary permissions requested
- Workflow triggers: Good coverage of issue/PR events
- Documentation: PR description is excellent
💡 Suggestions for future consideration
1. claude-code-review.yml
permissionsonly hasreadfor pull-requests — the code-review plugin might needwriteto post inline comments. If reviews don't post, try:pull-requests: write
fetch-depth: 1is fine for most cases, but deeper context might help Claude understand history if needed
2. claude.yml
- The
ifcondition is solid but a bit verbose. Consider extracting common logic or using a reusable workflow later if you add more triggers. - For more control, you might want to add
allowed_toolsrestriction as mentioned in the PR description
3. General
- Consider adding a
timeout-minutesto prevent runaway jobs - A
CLAUDE.mdfile in the repo root would give Claude project-specific context
Bottom line
Clean implementation, well-documented. Ship it! 🚀
🤖 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!