From ae86d4cd3df3262f60bb7d7a4f43b0fc495e0358 Mon Sep 17 00:00:00 2001 From: Marco Acierno Date: Sun, 14 Dec 2025 15:59:43 +0100 Subject: [PATCH 1/5] 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/5] 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/5] 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')) || From 425b0a3a302c4ac26fb0fb0d1824141595bbea95 Mon Sep 17 00:00:00 2001 From: Marco Acierno Date: Sat, 17 Jan 2026 16:47:05 +0000 Subject: [PATCH 4/5] Update claude.yml --- .github/workflows/claude.yml | 39 +++++++----------------------------- 1 file changed, 7 insertions(+), 32 deletions(-) diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml index a604ba06db..e2ae262c14 100644 --- a/.github/workflows/claude.yml +++ b/.github/workflows/claude.yml @@ -13,19 +13,13 @@ on: types: [review_requested] jobs: - debug: - runs-on: ubuntu-latest - steps: - - name: Debug - run: | - echo "github.event: ${{ fromJSON(github.event) }}" claude: if: | (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 == 'pull_request' && github.event.requested_user.name == 'pythonitaliabot2') + (github.event_name == 'pull_request' && github.event.action == 'review_requested') runs-on: ubuntu-latest timeout-minutes: 30 permissions: @@ -42,33 +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" + claude_code_oauth_token: ${{ secrets.CLAUDE_OAUTH_TOKEN }} - # Optional: Trigger when specific user is assigned to an issue + # Trigger when specific user is assigned to an issue assignee_trigger: "pythonitaliabot2" - # Optional: Configure Claude's behavior with CLI arguments - # claude_args: | - # --model claude-opus-4-1-20250805 - # --max-turns 10 - # --allowedTools "Bash(npm install),Bash(npm run build),Bash(npm run test:*),Bash(npm run lint:*)" - # --system-prompt "Follow our coding standards. Ensure all new code has tests. Use TypeScript for new files." - - # Optional: Advanced settings configuration - # settings: | - # { - # "env": { - # "NODE_ENV": "test" - # } - # } + # Trigger when specific user is requested as a reviewer on a PR + reviewer_trigger: "pythonitbot2" - - 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" + claude_args: | + --model claude-opus-4-5-20251101 From be5509c1d8845b02ff71ad7c726fb1c0f84547d6 Mon Sep 17 00:00:00 2001 From: Marco Acierno Date: Sat, 17 Jan 2026 16:47:31 +0000 Subject: [PATCH 5/5] Update claude.yml --- .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 e2ae262c14..cba22e5c31 100644 --- a/.github/workflows/claude.yml +++ b/.github/workflows/claude.yml @@ -43,7 +43,7 @@ jobs: assignee_trigger: "pythonitaliabot2" # Trigger when specific user is requested as a reviewer on a PR - reviewer_trigger: "pythonitbot2" + reviewer_trigger: "pythonitaliabot2" claude_args: | --model claude-opus-4-5-20251101