Skip to content

Commit e0e7257

Browse files
fix(ci): simplify auto-approve Claude check
Claude Code Action only sets conclusion, not output fields. Check for success conclusion instead of parsing output message. Signed-off-by: JasonXuDeveloper - 傑 <jason@xgamedev.net>
1 parent 49ce9d5 commit e0e7257

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

.github/workflows/auto-approve.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,15 @@ jobs:
5050
HEAD_SHA=$(gh api repos/${{ github.repository }}/pulls/$PR_NUMBER --jq '.head.sha')
5151
echo "Head SHA: $HEAD_SHA"
5252
53-
# Check Claude review status and output
54-
CLAUDE_CHECK=$(gh api repos/${{ github.repository }}/commits/$HEAD_SHA/check-runs --jq '.check_runs[] | select(.name == "claude-review")')
55-
CLAUDE_STATUS=$(echo "$CLAUDE_CHECK" | jq -r '.conclusion' | head -1)
56-
CLAUDE_OUTPUT=$(echo "$CLAUDE_CHECK" | jq -r '.output.summary // .output.text // ""' | head -1)
53+
# Check Claude review status
54+
# Note: Claude Code Action sets conclusion only, not output fields
55+
# A "success" conclusion means no blocking issues were found
56+
CLAUDE_STATUS=$(gh api repos/${{ github.repository }}/commits/$HEAD_SHA/check-runs --jq '.check_runs[] | select(.name == "claude-review") | .conclusion' | head -1)
5757
echo "Claude review status: $CLAUDE_STATUS"
58-
echo "Claude review output: $CLAUDE_OUTPUT"
5958
60-
# Check if Claude found no issues (exact message check)
59+
# Check if Claude review passed (success = no blocking issues)
6160
CLAUDE_APPROVED="false"
62-
if [ "$CLAUDE_STATUS" == "success" ] && echo "$CLAUDE_OUTPUT" | grep -q "No issues found. Checked for bugs and CLAUDE.md compliance"; then
61+
if [ "$CLAUDE_STATUS" == "success" ]; then
6362
CLAUDE_APPROVED="true"
6463
fi
6564
echo "Claude approved: $CLAUDE_APPROVED"

0 commit comments

Comments
 (0)