From ae86d4cd3df3262f60bb7d7a4f43b0fc495e0358 Mon Sep 17 00:00:00 2001 From: Marco Acierno Date: Sun, 14 Dec 2025 15:59:43 +0100 Subject: [PATCH 1/3] Run claude for PR reviews --- .github/workflows/claude.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml index 860135a063..869bff27a3 100644 --- a/.github/workflows/claude.yml +++ b/.github/workflows/claude.yml @@ -9,6 +9,8 @@ on: types: [opened, assigned] pull_request_review: types: [submitted] + pull_request: + types: [review_requested] jobs: claude: @@ -16,7 +18,8 @@ jobs: (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) || (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) || (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) || - (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude'))) + (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude'))) || + (github.event_name == 'pull_request' && github.event.requested_user.name == 'pythonitaliabot2') runs-on: ubuntu-latest timeout-minutes: 30 permissions: @@ -33,13 +36,14 @@ jobs: - name: Run Claude uses: anthropics/claude-code-action@v1 + if: ${{ github.event_name != 'pull_request' && github.event.requested_user.name != 'pythonitaliabot2' }} with: anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} # Optional: Customize the trigger phrase (default: @claude) # trigger_phrase: "/claude" # Optional: Trigger when specific user is assigned to an issue - assignee_trigger: "claude-bot" + assignee_trigger: "pythonitaliabot2" # Optional: Configure Claude's behavior with CLI arguments # claude_args: | @@ -55,3 +59,10 @@ jobs: # "NODE_ENV": "test" # } # } + + - name: Run code-review + uses: anthropics/claude-code-action@v1 + if: ${{ github.event_name == 'pull_request' && github.event.requested_user.name == 'pythonitaliabot2' }} + with: + anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} + prompt: "Review this PR" From 578e80e378d14d0fbfbfae7e4440e9d0a06e561d Mon Sep 17 00:00:00 2001 From: Marco Acierno Date: Sun, 14 Dec 2025 16:02:05 +0100 Subject: [PATCH 2/3] debug --- .github/workflows/claude.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml index 869bff27a3..2ca06e9355 100644 --- a/.github/workflows/claude.yml +++ b/.github/workflows/claude.yml @@ -13,6 +13,12 @@ on: types: [review_requested] jobs: + debug: + runs-on: ubuntu-latest + steps: + - name: Debug + run: | + echo "github.event: ${{ github.event }}" claude: if: | (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) || From ac347303d1b56983a51fda9359b19d544bf1b2c5 Mon Sep 17 00:00:00 2001 From: Marco Acierno Date: Sun, 14 Dec 2025 16:03:16 +0100 Subject: [PATCH 3/3] debug --- .github/workflows/claude.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml index 2ca06e9355..a604ba06db 100644 --- a/.github/workflows/claude.yml +++ b/.github/workflows/claude.yml @@ -18,7 +18,7 @@ jobs: steps: - name: Debug run: | - echo "github.event: ${{ github.event }}" + echo "github.event: ${{ fromJSON(github.event) }}" claude: if: | (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||