From 5fd9022caa93b78e6b4fdac718847f1286c368cb Mon Sep 17 00:00:00 2001 From: nrslib <38722970+nrslib@users.noreply.github.com> Date: Sat, 28 Feb 2026 17:34:41 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20takt-review=20=E3=82=92=20pull=5Frequest?= =?UTF-8?q?=5Ftarget=20=E3=81=AB=E5=A4=89=E6=9B=B4=E3=81=97=E3=81=A6=20for?= =?UTF-8?q?k=20PR=20=E3=81=A7=E3=82=82=E3=82=B7=E3=83=BC=E3=82=AF=E3=83=AC?= =?UTF-8?q?=E3=83=83=E3=83=88=E3=82=92=E5=88=A9=E7=94=A8=E5=8F=AF=E8=83=BD?= =?UTF-8?q?=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - pull_request → pull_request_target でベースリポジトリのコンテキストで実行 - fork リポジトリからのチェックアウトに repository を追加 - ANTHROPIC_API_KEY が空の場合に即座にエラー終了するガードを追加 --- .github/workflows/takt-review.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/takt-review.yml b/.github/workflows/takt-review.yml index 89e5cb7..c800a73 100644 --- a/.github/workflows/takt-review.yml +++ b/.github/workflows/takt-review.yml @@ -1,7 +1,7 @@ name: TAKT PR Review on: - pull_request: + pull_request_target: types: [opened, synchronize, ready_for_review, reopened] jobs: @@ -15,8 +15,18 @@ jobs: - uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} + repository: ${{ github.event.pull_request.head.repo.full_name }} fetch-depth: 0 + - name: API キー確認 + run: | + if [ -z "$ANTHROPIC_API_KEY" ]; then + echo "::error::ANTHROPIC_API_KEY is not set" + exit 1 + fi + env: + ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} + - uses: actions/setup-node@v4 with: node-version: 20