fix: fork PR 没有 secrets 时跳过 AI 审查

This commit is contained in:
adminlove520
2026-03-20 12:12:37 +08:00
parent 94f4aadb02
commit 55e6ba1eab

View File

@@ -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