Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughTwo new GitHub Actions workflows are added to enable automated code review functionality using Claude. One workflow performs automatic code reviews on pull requests, while the other responds to code-related comments mentioning Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)✅ Unit Tests committed locally.
Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/claude-code-review.yml:
- Around line 29-32: The workflow uses actions/checkout@v4 with fetch-depth: 1
which limits history and harms multi-commit PR reviews; update the checkout step
to fetch full history (set fetch-depth: 0) or increase the depth to a number
that includes the merge base (e.g., fetch-depth: 50) so Claude can access the
full PR context, keeping the change confined to the checkout action
configuration.
- Around line 22-26: The permissions block currently grants only read access for
contents, pull-requests, and issues which prevents the action from posting
reviews; update the permissions section to set pull-requests: write and also
change contents and issues to write (keep id-token: write) so the workflow can
publish code review comments and follow the official example; modify the
permissions entries named "contents", "pull-requests", and "issues" accordingly.
In @.github/workflows/claude.yml:
- Around line 28-31: The workflow step using actions/checkout@v4 currently sets
fetch-depth: 1 which limits git history; update that checkout step (the
"Checkout repository" job using actions/checkout@v4) to either remove the
fetch-depth option or set fetch-depth to a larger value (e.g., 0 for full
history or a reasonable n) so Claude and CI have adequate commit context for
analyses and PR tasks.
- Around line 21-26: The workflow's permissions block lacks write access for
'issues' and 'pull-requests', preventing anthropics/claude-code-action from
posting responses; update the permissions in the permissions section so that
'issues' and 'pull-requests' are set to write (keep other permissions like
'contents: read', 'id-token: write', and 'actions: read' as needed) so Claude
can create/update comments on PRs and issues.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: cbbc7c1d-12cc-40d6-9c2e-b95ecd80408d
📒 Files selected for processing (2)
.github/workflows/claude-code-review.yml.github/workflows/claude.yml
|
Note Unit test generation is a public access feature. Expect some limitations and changes as we gather feedback and continue to improve it. Generating unit tests... This may take up to 20 minutes. |
|
✅ Unit tests committed locally. Commit: |
🤖 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