mirror of
https://github.com/GoodOlClint/PSProxmoxVE.git
synced 2026-09-04 19:25:36 +00:00
Merge pull request #101 from GoodOlClint/ci/review-fail-closed
ci: fail the review job when no review actually ran
This commit is contained in:
@@ -68,6 +68,22 @@ jobs:
|
|||||||
claude_args: |
|
claude_args: |
|
||||||
--allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr review:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh api:*)"
|
--allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr review:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh api:*)"
|
||||||
|
|
||||||
|
# claude-code-action self-skips (exit 0, step outcome "success") when the
|
||||||
|
# PR's copy of THIS workflow file differs from the default branch — its
|
||||||
|
# anti-tamper gate, keyed on this one file, so PRs changing ci.yml or
|
||||||
|
# publish.yml are reviewed normally. No review runs, so the verify step
|
||||||
|
# below is skipped and the job would otherwise go green unreviewed.
|
||||||
|
# `execution_file` is only set once Claude actually ran, so an empty
|
||||||
|
# value is the reliable "did not run" signal; `outcome` is not. It is
|
||||||
|
# cause-agnostic: it also stays empty when the action dies before Claude
|
||||||
|
# starts (token exchange, write permission, install failure), which is
|
||||||
|
# why the message points at the step log rather than asserting one cause.
|
||||||
|
- name: Fail closed — review did not run
|
||||||
|
if: always() && steps.claude-review.outputs.execution_file == ''
|
||||||
|
run: |
|
||||||
|
echo "::error title=Claude review did NOT run::No automated review was performed, so this check cannot pass. Most likely the anti-tamper gate - this PR's copy of .github/workflows/claude-code-review.yml differs from the default branch. Only THIS file trips it; PRs changing other workflows are reviewed normally. This step also fires on any failure before Claude starts (expired token, missing write permission, install failure), so read the 'Run Claude Code Review' step log to tell them apart. Either way this PR requires operator review before merge."
|
||||||
|
exit 1
|
||||||
|
|
||||||
- name: Verify formal review was submitted
|
- name: Verify formal review was submitted
|
||||||
if: always() && steps.claude-review.outputs.execution_file != ''
|
if: always() && steps.claude-review.outputs.execution_file != ''
|
||||||
env:
|
env:
|
||||||
|
|||||||
Reference in New Issue
Block a user