diff --git a/.github/workflows/qwen-code-pr-review.yml b/.github/workflows/qwen-code-pr-review.yml index 49f38fc7..7c9b9fe9 100644 --- a/.github/workflows/qwen-code-pr-review.yml +++ b/.github/workflows/qwen-code-pr-review.yml @@ -18,7 +18,11 @@ jobs: review-pr: if: > github.event_name == 'workflow_dispatch' || - (github.event_name == 'pull_request' && github.event.action == 'opened') || + (github.event_name == 'pull_request_target' && + github.event.action == 'opened' && + (github.event.pull_request.author_association == 'OWNER' || + github.event.pull_request.author_association == 'MEMBER' || + github.event.pull_request.author_association == 'COLLABORATOR')) || (github.event_name == 'issue_comment' && github.event.issue.pull_request && contains(github.event.comment.body, '@qwen /review') && @@ -49,9 +53,9 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} fetch-depth: 0 - - name: Get PR details (pull_request & workflow_dispatch) + - name: Get PR details (pull_request_target & workflow_dispatch) id: get_pr - if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' + if: github.event_name == 'pull_request_target' || github.event_name == 'workflow_dispatch' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: |