Skip to content

Commit 6a5b635

Browse files
feat: Add Claude Code automated PR review workflow (#1074)
* feat: add Claude Code automated PR review workflow - Add GitHub Actions workflow for automated PR reviews using Claude Code - Configure workflow to analyze code quality, security, performance, and testing - Update CONTRIBUTING.md to document automated review process - Workflow posts review comments and flags critical issues 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor: simplify Claude Code review prompt and add changeset - Streamline review prompt to bare minimum - Add changeset for workflow addition 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * style: format files with prettier 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor: simplify Claude Code workflow using official action - Use anthropics/claude-code-action@beta instead of custom CLI setup - Remove complex diff handling and comment posting logic - Simplify to minimal configuration with direct prompt - Reduce timeout to 10 minutes for faster feedback 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: use Claude API directly instead of GitHub App - Replace anthropics/claude-code-action with direct API calls - Use curl to call Claude API with existing ANTHROPIC_API_KEY secret - Removes dependency on GitHub App installation - Simpler implementation using Claude 3.5 Sonnet model 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * revert: back to official claude-code-action for GitHub App usage - Revert to anthropics/claude-code-action@beta - Requires Claude Code GitHub App installation at https://github.com/apps/claude - Cleaner implementation using official action - Maintains API key authentication 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 0fb31ec commit 6a5b635

3 files changed

Lines changed: 44 additions & 0 deletions

File tree

.changeset/9fcc6929312e2664.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
---
3+
4+
Add Claude Code automated PR review workflow
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Claude Code PR Review
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize]
6+
branches:
7+
- main
8+
9+
jobs:
10+
claude-review:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
pull-requests: write
15+
id-token: write
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Automatic PR Review
23+
uses: anthropics/claude-code-action@beta
24+
with:
25+
anthropic_api_key: ${{ secrets.CLAUDE_CODE_ANTHROPIC_API_KEY }}
26+
timeout_minutes: "10"
27+
direct_prompt: |
28+
Review this PR. Focus on code quality, security, and potential issues. Provide specific feedback with file references.

CONTRIBUTING.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,18 @@ We love your Pull Requests! A couple of things to keep in mind before you submit
159159
- Please discuss implementation approach beforehand to avoid having PRs rejected
160160
- Please actively discuss with the Lingo.dev team in the PR and related Issue(s)
161161
162+
#### Automated Code Review
163+
164+
We use Claude Code to provide automated code reviews on all pull requests. This helps ensure:
165+
166+
- Code quality and maintainability
167+
- Security best practices
168+
- Performance considerations
169+
- Proper test coverage
170+
- Documentation completeness
171+
172+
The automated review will post comments on your PR with suggestions and feedback. While these are helpful guidelines, human reviewers will make the final decisions. If Claude Code identifies critical security issues, please address them promptly.
173+
162174
---
163175
164176
Thank you!

0 commit comments

Comments
 (0)