From 55e6ba1eab35571bdd1c1214cda52edc4372e862 Mon Sep 17 00:00:00 2001 From: adminlove520 <791751568@qq.com> Date: Fri, 20 Mar 2026 12:12:37 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20fork=20PR=20=E6=B2=A1=E6=9C=89=20secrets?= =?UTF-8?q?=20=E6=97=B6=E8=B7=B3=E8=BF=87=20AI=20=E5=AE=A1=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pr-review.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-review.yml b/.github/workflows/pr-review.yml index 0ca3843..edf112b 100644 --- a/.github/workflows/pr-review.yml +++ b/.github/workflows/pr-review.yml @@ -181,11 +181,13 @@ jobs: name: 🤖 AI 代码审查 runs-on: ubuntu-latest needs: [security-check, auto-check] + # fork PR 没有 secrets,需要跳过或手动触发 if: | needs.security-check.outputs.safe_to_run == 'true' && needs.auto-check.result == 'success' && needs.auto-check.outputs.has_reviewable_changes == 'true' && - vars.ENABLE_AI_REVIEW != 'false' + vars.ENABLE_AI_REVIEW != 'false' && + secrets.OPENAI_API_KEY != '' steps: # 先检出主分支(获取最新的 .github/scripts)