From ce8a77083dc00423b2c1a4c7657aa7290684dea6 Mon Sep 17 00:00:00 2001 From: hathach Date: Thu, 5 Mar 2026 20:59:26 +0700 Subject: [PATCH] ci: fix claude-code-review for fork PRs Switch pull_request to pull_request_target so secrets and OIDC tokens are available when reviewing PRs from forks. Also add pull-requests: write permission so the action can post review comments. Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/claude-code-review.yml | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/.github/workflows/claude-code-review.yml b/.github/workflows/claude-code-review.yml index 25f4ad18c..5ba2fe900 100644 --- a/.github/workflows/claude-code-review.yml +++ b/.github/workflows/claude-code-review.yml @@ -1,27 +1,15 @@ name: Claude Code Review on: - pull_request: + pull_request_target: types: [opened, synchronize, ready_for_review, reopened] - # Optional: Only run on specific file changes - # paths: - # - "src/**/*.ts" - # - "src/**/*.tsx" - # - "src/**/*.js" - # - "src/**/*.jsx" jobs: claude-review: - # Optional: Filter by PR author - # if: | - # github.event.pull_request.user.login == 'external-contributor' || - # github.event.pull_request.user.login == 'new-developer' || - # github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' - runs-on: ubuntu-latest permissions: contents: read - pull-requests: read + pull-requests: write issues: read id-token: write