Skip to content

Commit ae86d4c

Browse files
committed
Run claude for PR reviews
1 parent cf37c8a commit ae86d4c

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

.github/workflows/claude.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,17 @@ on:
99
types: [opened, assigned]
1010
pull_request_review:
1111
types: [submitted]
12+
pull_request:
13+
types: [review_requested]
1214

1315
jobs:
1416
claude:
1517
if: |
1618
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
1719
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
1820
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
19-
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
21+
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude'))) ||
22+
(github.event_name == 'pull_request' && github.event.requested_user.name == 'pythonitaliabot2')
2023
runs-on: ubuntu-latest
2124
timeout-minutes: 30
2225
permissions:
@@ -33,13 +36,14 @@ jobs:
3336

3437
- name: Run Claude
3538
uses: anthropics/claude-code-action@v1
39+
if: ${{ github.event_name != 'pull_request' && github.event.requested_user.name != 'pythonitaliabot2' }}
3640
with:
3741
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
3842
# Optional: Customize the trigger phrase (default: @claude)
3943
# trigger_phrase: "/claude"
4044

4145
# Optional: Trigger when specific user is assigned to an issue
42-
assignee_trigger: "claude-bot"
46+
assignee_trigger: "pythonitaliabot2"
4347

4448
# Optional: Configure Claude's behavior with CLI arguments
4549
# claude_args: |
@@ -55,3 +59,10 @@ jobs:
5559
# "NODE_ENV": "test"
5660
# }
5761
# }
62+
63+
- name: Run code-review
64+
uses: anthropics/claude-code-action@v1
65+
if: ${{ github.event_name == 'pull_request' && github.event.requested_user.name == 'pythonitaliabot2' }}
66+
with:
67+
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
68+
prompt: "Review this PR"

0 commit comments

Comments
 (0)