Conversation
e785cca to
948406c
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds GitHub Actions workflows to integrate Claude Code into the repository, enabling both on-demand runs (triggered by @claude mentions) and automated PR review runs.
Changes:
- Add a workflow (
claude.yml) that triggers Claude Code when@claudeappears in issue/PR comment and review events. - Add a workflow (
claude-code-review.yml) that runs an automated Claude-based code review on PR lifecycle events (open/sync/etc.).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
.github/workflows/claude.yml |
On-demand Claude Code workflow triggered by @claude detection across issue/PR comment/review events. |
.github/workflows/claude-code-review.yml |
Automated Claude Code review workflow triggered on PR events. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Adds a GitHub Actions workflow that triggers Claude Code when @claude is mentioned in PR or issue comments.
Adds a GitHub Actions workflow that triggers Claude Code to review PRs when requested via the review-requested event.
- Add author_association check to restrict Claude triggers to OWNER, MEMBER, and COLLABORATOR (prevents unauthorized access) - Change issues event from 'assigned' to 'edited' (assigned was noise) - Add concurrency groups to both workflows (prevents overlapping runs) - Pin claude-code-action to SHA for supply-chain safety - Make claude-code-review opt-in via 'claude-review' label
The claude-code-action needs write permissions to post review comments. Changed `pull-requests` and `issues` from `read` to `write`.
Fork PRs don't receive repository secrets in `pull_request` workflows, so the job would fail. Added guard to skip when PR head repo differs from the base repository.
86576da to
99f5af6
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
💡 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')) && | ||
| contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'), github.event.issue.author_association)) |
There was a problem hiding this comment.
For the issues trigger, the authorization gate checks github.event.issue.author_association, which is the issue author’s association. On issues: edited, the editor may be different from the author, so an authorized maintainer editing an external user’s issue to add @claude will not trigger this job. If supporting edited is intended, consider either removing edited from the trigger or switching to an explicit permission check based on the editing actor (github.actor) via the GitHub API.
|
Claude finished @boneskull's task in 1m 22s —— View job Code ReviewOverall this is a well-structured pair of workflows with good iterative hardening based on the Copilot review. Here are my findings:
|
| Severity | Count |
|---|---|
| High | 1 |
| Medium | 2 |
| Low | 4 |
| Info | 1 |
The most actionable item is the missing label gate in claude-code-review.yml — the current merged state will auto-review all internal PRs regardless of labels.
🤖 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
CLAUDE_CODE_OAUTH_TOKEN, an OAuth token stored securely as a GitHub Actions secretOWNER,MEMBER, orCOLLABORATORauthor association (this is GitHub's classification of how a user relates to the repository, not a direct permission check)pull_requestworkflows don't receive repository secrets for forksThere'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!