From 009ab8359d1e7dfa838bd9ac52e29cb8d9fd1d6a Mon Sep 17 00:00:00 2001 From: yunlonggao-mega Date: Mon, 10 Aug 2026 02:47:27 +0000 Subject: [PATCH] ci: use fork-safe review trigger --- .github/workflows/claude.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml index ffebc1a..3a39c46 100644 --- a/.github/workflows/claude.yml +++ b/.github/workflows/claude.yml @@ -6,7 +6,7 @@ on: types: [created] pull_request_review: types: [submitted] - pull_request: + pull_request_target: types: [opened, synchronize, ready_for_review, reopened] jobs: @@ -50,7 +50,7 @@ jobs: group: claude-pr-review-${{ github.event.pull_request.number }} cancel-in-progress: false if: | - github.event_name == 'pull_request' && + github.event_name == 'pull_request_target' && (github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.action == 'ready_for_review' || @@ -83,6 +83,8 @@ jobs: token: ${{ steps.app-token.outputs.token }} persist-credentials: false fetch-depth: 1 + # Keep pull_request_target on trusted base-branch code. + ref: ${{ github.event.pull_request.base.sha }} - name: Detect claude workflow changes id: workflow-change