From 9ce3cf55fc5f8cb8e8c86e505a56d7e956b459f4 Mon Sep 17 00:00:00 2001 From: LUIS NOVO Date: Tue, 13 Jan 2026 18:40:18 -0300 Subject: [PATCH] fix: allow claude code review workflow to run on PRs from forks Switch from pull_request to pull_request_target event to enable OIDC token access for external contributor PRs. This allows the Claude Code action to authenticate properly when reviewing PRs from forks. Also added explicit PR head SHA ref to checkout to ensure we review the correct code. Fixes workflow failure: Unable to get ACTIONS_ID_TOKEN_REQUEST_URL --- .github/workflows/claude-code-review.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/claude-code-review.yml b/.github/workflows/claude-code-review.yml index b5e8cfd..743483e 100644 --- a/.github/workflows/claude-code-review.yml +++ b/.github/workflows/claude-code-review.yml @@ -1,7 +1,7 @@ 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: @@ -29,6 +29,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 with: + ref: ${{ github.event.pull_request.head.sha }} fetch-depth: 1 - name: Run Claude Code Review