You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Remove unnecessary checkout step
- Add -R flag to gh pr review command
- Check for exact Claude message "No issues found. Checked for bugs and CLAUDE.md compliance"
Signed-off-by: JasonXuDeveloper - 傑 <jason@xgamedev.net>
# Check if Claude found no issues (exact message check)
61
+
CLAUDE_APPROVED="false"
62
+
if [ "$CLAUDE_STATUS" == "success" ] && echo "$CLAUDE_OUTPUT" | grep -q "No issues found. Checked for bugs and CLAUDE.md compliance"; then
63
+
CLAUDE_APPROVED="true"
64
+
fi
65
+
echo "Claude approved: $CLAUDE_APPROVED"
56
66
57
67
# Check Unity Tests status (commit status, not check run)
58
68
UNITY_STATUS=$(gh api repos/${{ github.repository }}/commits/$HEAD_SHA/status --jq '.statuses[] | select(.context == "Unity Tests") | .state' | head -1)
@@ -68,11 +78,11 @@ jobs:
68
78
fi
69
79
70
80
# Determine if we should approve
71
-
if [ "$CLAUDE_STATUS" == "success" ] && [ "$UNITY_STATUS" == "success" ]; then
72
-
echo "All required checks passed!"
81
+
if [ "$CLAUDE_APPROVED" == "true" ] && [ "$UNITY_STATUS" == "success" ]; then
82
+
echo "All required checks passed and Claude found no issues!"
73
83
echo "should_approve=true" >> $GITHUB_OUTPUT
74
84
else
75
-
echo "Required checks not yet passed"
85
+
echo "Required checks not yet passed or Claude found issues"
76
86
echo "should_approve=false" >> $GITHUB_OUTPUT
77
87
fi
78
88
@@ -102,6 +112,6 @@ jobs:
102
112
run: |
103
113
PR_NUMBER="${{ steps.pr.outputs.number }}"
104
114
105
-
gh pr review $PR_NUMBER --approve --body "Auto-approved: Claude review passed and Unity Tests passed (or were skipped for non-code changes)."
115
+
gh pr review $PR_NUMBER -R ${{ github.repository }} --approve --body "Auto-approved: Claude review found no issues and Unity Tests passed (or were skipped for non-code changes)."
0 commit comments