-
Notifications
You must be signed in to change notification settings - Fork 0
Add Claude Code GitHub Workflow #22
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
Add Claude Code GitHub Workflow #22
Conversation
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughTwo GitHub workflow files receive non-functional whitespace updates. A blank line is inserted after a comment in the Claude Code Review workflow, and another blank line is added after an example argument in the "Run Claude" workflow step. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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
Adds/adjusts GitHub Actions workflows for Claude Code integration and automated Claude-based PR code reviews.
Changes:
- Updates
.github/workflows/claude.yml(mention-driven Claude workflow). - Updates
.github/workflows/claude-code-review.yml(PR-event-driven Claude code review workflow). - Both diffs appear to be whitespace-only (trailing newline) adjustments.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
.github/workflows/claude.yml |
Claude Code workflow triggered by @claude mentions in issues/PR comments/reviews. |
.github/workflows/claude-code-review.yml |
Claude Code Review workflow triggered automatically on PR events. |
Comments suppressed due to low confidence (3)
.github/workflows/claude-code-review.yml:45
- This job uses
secrets.CLAUDE_CODE_OAUTH_TOKEN, but the workflow runs on thepull_requestevent. For PRs from forks, GitHub does not pass repository secrets, so this will systematically fail (or be skipped) for external contributors. Consider restricting execution to same-repo PRs (e.g.,if: github.event.pull_request.head.repo.full_name == github.repository) or switching to a safepull_request_targetdesign if you truly need it to run on forked PRs.
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
plugin_marketplaces: 'https://github.com/anthropics/claude-code.git'
plugins: 'code-review@claude-code-plugins'
prompt: '/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}'
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
# or https://code.claude.com/docs/en/cli-reference for available options
.github/workflows/claude.yml:51
- The workflow can be triggered by any commenter who includes
@claude(e.g., onissue_comment), but it runs withsecrets.CLAUDE_CODE_OAUTH_TOKEN. There’s no check onauthor_association/repo permissions, so an external user could potentially trigger runs that consume the secret. Add an explicit gate in the jobif:to allow only trusted actors (e.g.,OWNER|MEMBER|COLLABORATOR, or users with write access) for each event type before invoking the action.
# claude_args: '--allowed-tools Bash(gh pr:*)'
.github/workflows/claude-code-review.yml:45
- PR description says Claude runs when someone mentions
@claude, but this workflow triggers on PR lifecycle events (pull_requestopened/synchronize/etc.) and will run even without any mention. Either update the workflow to be mention-driven (similar toclaude.yml), or update the PR description to reflect that it auto-runs on every PR.
prompt: '/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}'
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
# or https://code.claude.com/docs/en/cli-reference for available options
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
🤖 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
✏️ Tip: You can customize this high-level summary in your review settings.