@@ -2,18 +2,46 @@ name: Claude Code Review
22
33on :
44 pull_request :
5- types : [opened, synchronize, ready_for_review, reopened]
6- # Optional: Only run on specific file changes
7- # paths:
8- # - "src/**/*.ts"
9- # - "src/**/*.tsx"
10- # - "src/**/*.js"
11- # - "src/**/*.jsx"
5+ types : [opened, edited, synchronize, ready_for_review, reopened]
6+ paths :
7+ - " **/*.js"
8+ - " **/*.jsx"
9+ - " **/*.ts"
10+ - " **/*.tsx"
11+ - " **/*.java"
12+ - " **/*.kt"
13+ - " **/*.go"
14+ - " **/*.py"
15+ - " **/*.rs"
16+ - " **/*.sol"
17+ - " **/*.zkasm"
18+ - " **/*.lisp"
19+ - " **/Makefile"
20+ - " **/*.mk"
21+ - " **/Dockerfile"
22+ - " **/Dockerfile.*"
23+ - " **/*.dockerfile"
24+ - " **/*.sh"
25+ - " **/*.bash"
26+ - " **/*.gradle"
27+ - " **/*.gradle.kts"
28+ - " **/gradlew"
29+ - " **/gradle.properties"
30+ - " **/settings.gradle"
31+ - " **/settings.gradle.kts"
1232
1333jobs :
1434 claude-review :
15- # Only run on PRs from the same repo (team members), not forks
16- if : github.event.pull_request.head.repo.full_name == github.repository
35+ # Only run when '@claude-review' is present in the PR description
36+ # and the author is a repo owner, member, or collaborator (i.e. team member)
37+ if : |
38+ github.event.pull_request.head.repo.full_name == github.repository &&
39+ contains(github.event.pull_request.body, '@claude-review') &&
40+ (
41+ github.event.pull_request.author_association == 'OWNER' ||
42+ github.event.pull_request.author_association == 'MEMBER' ||
43+ github.event.pull_request.author_association == 'COLLABORATOR'
44+ )
1745
1846 runs-on : ubuntu-latest
1947 permissions :
3361 uses : anthropics/claude-code-action@5d0cc745cd0cce4c0e9e0b3511de26c3bc285eb5 # v1.0.71
3462 with :
3563 anthropic_api_key : ${{ secrets.ANTHROPIC_API_KEY }}
36- plugin_marketplaces : ' https://github.com/anthropics/claude-code.git'
37- plugins : ' code-review@claude-code-plugins'
38- prompt : ' /code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}'
39- # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
40- # or https://code.claude.com/docs/en/cli-reference for available options
64+ # use_sticky_comment: false
65+ direct_prompt : |
66+ You are a senior software engineer performing a thorough code review on PR #${{ github.event.pull_request.number }} in ${{ github.repository }}.
4167
68+ Review ONLY changed files with the following extensions or names:
69+ .js .jsx .ts .tsx .java .kt .go .py .rs .sol .sh .bash .gradle .gradle.kts .mk .dockerfile .zkasm .lisp
70+ Makefile gradlew gradle.properties settings.gradle settings.gradle.kts Dockerfile Dockerfile.*
71+
72+ For each issue you find, post an inline pull request review comment on the exact file and line where the problem occurs.
73+
74+ Focus on:
75+ - Bugs and logic errors
76+ - Security vulnerabilities (injection, unsafe deserialization, improper auth, etc.)
77+ - Performance problems
78+ - Code quality, readability, and maintainability issues
79+ - Incorrect or missing error handling
80+
81+ Be specific, actionable, and constructive. Do NOT post a general top-level PR summary comment.
0 commit comments