fix: takt-review を pull_request_target に変更して fork PR でもシークレットを利用可能に
- pull_request → pull_request_target でベースリポジトリのコンテキストで実行 - fork リポジトリからのチェックアウトに repository を追加 - ANTHROPIC_API_KEY が空の場合に即座にエラー終了するガードを追加
This commit is contained in:
parent
e5665ed8cd
commit
5fd9022caa
12
.github/workflows/takt-review.yml
vendored
12
.github/workflows/takt-review.yml
vendored
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user