File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,17 +50,16 @@ 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)
57- echo "Claude review status: $CLAUDE_STATUS"
58- echo "Claude review output: $CLAUDE_OUTPUT"
59-
60- # Check if Claude found no issues (exact message check)
53+ # Check Claude review - look for "No issues found" comment from claude[bot]
54+ # Claude posts a PR comment with this message when review passes
55+ CLAUDE_COMMENTS=$(gh api "repos/${{ github.repository }}/issues/$PR_NUMBER/comments" --jq '[.[] | select(.user.login == "claude[bot]") | .body] | join("\n")')
56+
6157 CLAUDE_APPROVED="false"
62- if [ "$CLAUDE_STATUS" == "success" ] && echo "$CLAUDE_OUTPUT" | grep -q "No issues found. Checked for bugs and CLAUDE.md compliance"; then
58+ if echo "$CLAUDE_COMMENTS" | grep -q "No issues found. Checked for bugs and CLAUDE.md compliance"; then
59+ echo "Claude review: No issues found"
6360 CLAUDE_APPROVED="true"
61+ else
62+ echo "Claude review: Issues found or not yet complete"
6463 fi
6564 echo "Claude approved: $CLAUDE_APPROVED"
6665
Original file line number Diff line number Diff line change @@ -47,3 +47,13 @@ annotations:
4747 - token-permissions
4848 reasons :
4949 - reason : not-applicable # Write permissions required for test reporting and release automation
50+
51+ # Branch protection: Using GitHub Rulesets with auto-approve bot
52+ # - Rulesets require 1 approver (provided by auto-approve bot)
53+ # - Code owner review is required
54+ # - last_push_approval disabled to allow auto-approve bot to work
55+ # - bypass_actors: [] prevents admin bypass
56+ - checks :
57+ - branch-protection
58+ reasons :
59+ - reason : not-applicable # Using Rulesets with auto-approve bot requiring last_push_approval disabled
You can’t perform that action at this time.
0 commit comments