From f0de61ca21bb4757ae2f18e0382c8829638745d9 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Sun, 16 Nov 2025 19:34:36 +0000 Subject: [PATCH] CI: run translator in pull_request_target for comment access --- .github/workflows/translation-ai-check.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/translation-ai-check.yml b/.github/workflows/translation-ai-check.yml index d0fbd3e4..1b4636b2 100644 --- a/.github/workflows/translation-ai-check.yml +++ b/.github/workflows/translation-ai-check.yml @@ -1,7 +1,7 @@ name: AI Translation Check on: - pull_request: + pull_request_target: types: - opened paths: @@ -18,7 +18,7 @@ permissions: jobs: review: name: Review Translation - if: ${{ github.event_name == 'pull_request' || (github.event_name == 'issue_comment' && github.event.action == 'created' && github.event.issue.pull_request != null && github.event.comment.user.login == 'vaxerski' && github.event.comment.body == 'ai, please recheck' ) }} + if: ${{ github.event_name == 'pull_request_target' || (github.event_name == 'issue_comment' && github.event.action == 'created' && github.event.issue.pull_request != null && github.event.comment.user.login == 'vaxerski' && github.event.comment.body == 'ai, please recheck' ) }} runs-on: ubuntu-latest env: OPENAI_MODEL: gpt-5-mini @@ -32,8 +32,8 @@ jobs: - name: Determine PR number id: pr run: | - if [ "${{ github.event_name }}" = "pull_request" ]; then - echo "number=${{ github.event.pull_request.number }}" >> "$GITHUB_OUTPUT" + if [ "${{ github.event_name }}" = "pull_request_target" ]; then + echo "number=${{ github.event.pull_request_target.number }}" >> "$GITHUB_OUTPUT" else echo "number=${{ github.event.issue.number }}" >> "$GITHUB_OUTPUT" fi