@@ -17,8 +17,15 @@ concurrency:
1717permissions : {}
1818
1919jobs :
20+ check-run :
21+ name : Check PR run
22+ uses : ./.github/workflows/check-run.yml
23+ permissions :
24+ contents : read
25+
2026 validation :
2127 name : Validation
28+ needs : check-run
2229 runs-on : ubuntu-24.04
2330 permissions :
2431 contents : read
@@ -33,23 +40,10 @@ jobs:
3340 run : |
3441 if [ "$IS_DRAFT" == "true" ]; then
3542 echo "⚠️ Validation: PR is a draft - skipping review"
36- echo "pr_valid=false" >> $GITHUB_OUTPUT
43+ echo "pr_valid=false" >> " $GITHUB_OUTPUT"
3744 else
3845 echo "✅ Validation: PR is ready for review"
39- echo "pr_valid=true" >> $GITHUB_OUTPUT
40- fi
41-
42- - name : Check if PR is from a bot
43- id : check-user-type-bot
44- env :
45- PR_AUTHOR_TYPE : ${{ github.event.pull_request.user.type }}
46- run : |
47- if [ "$PR_AUTHOR_TYPE" == "Bot" ]; then
48- echo "⚠️ Validation: PR opened by bot - skipping review"
49- echo "is_bot=true" >> $GITHUB_OUTPUT
50- else
51- echo "✅ Validation: PR opened by human user"
52- echo "is_bot=false" >> $GITHUB_OUTPUT
46+ echo "pr_valid=true" >> "$GITHUB_OUTPUT"
5347 fi
5448
5549 - name : Check if prompt file exists using GitHub CLI
@@ -61,10 +55,10 @@ jobs:
6155 FILE_PATH : " .claude/prompts/review-code.md"
6256 run : |
6357 if gh api "repos/$REPO/contents/$FILE_PATH?ref=$REF" --silent 2>/dev/null; then
64- echo "prompt_exists=true" >> $GITHUB_OUTPUT
58+ echo "prompt_exists=true" >> " $GITHUB_OUTPUT"
6559 echo "✅ Found $FILE_PATH in $REPO"
6660 else
67- echo "prompt_exists=false" >> $GITHUB_OUTPUT
61+ echo "prompt_exists=false" >> " $GITHUB_OUTPUT"
6862 echo "⚠️ Validation: No $FILE_PATH found - skipping Claude review"
6963 fi
7064
@@ -73,15 +67,13 @@ jobs:
7367 env :
7468 PR_VALID : ${{ steps.check-pr.outputs.pr_valid }}
7569 PROMPT_EXISTS : ${{ steps.check-prompt.outputs.prompt_exists }}
76- IS_BOT : ${{ steps.check-user-type-bot.outputs.is_bot }}
7770 run : |
7871 if [ "$PR_VALID" == "true" ] && \
79- [ "$PROMPT_EXISTS" == "true" ] && \
80- [ "$IS_BOT" == "false" ]; then
81- echo "should_review=true" >> $GITHUB_OUTPUT
72+ [ "$PROMPT_EXISTS" == "true" ]; then
73+ echo "should_review=true" >> "$GITHUB_OUTPUT"
8274 echo "✅ Validation passed - code review will proceed"
8375 else
84- echo "should_review=false" >> $GITHUB_OUTPUT
76+ echo "should_review=false" >> " $GITHUB_OUTPUT"
8577 echo "⚠️ Validation failed - code review will be skipped"
8678 fi
8779
0 commit comments