Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions .github/workflows/auto-approve.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,19 @@ jobs:
HEAD_SHA=$(gh api repos/${{ github.repository }}/pulls/$PR_NUMBER --jq '.head.sha')
echo "Head SHA: $HEAD_SHA"

# Check Claude review status and output
CLAUDE_CHECK=$(gh api repos/${{ github.repository }}/commits/$HEAD_SHA/check-runs --jq '.check_runs[] | select(.name == "claude-review")')
CLAUDE_STATUS=$(echo "$CLAUDE_CHECK" | jq -r '.conclusion' | head -1)
CLAUDE_OUTPUT=$(echo "$CLAUDE_CHECK" | jq -r '.output.summary // .output.text // ""' | head -1)
echo "Claude review status: $CLAUDE_STATUS"
echo "Claude review output: $CLAUDE_OUTPUT"

# Check if Claude found no issues (exact message check)
# Check Claude review - look for "No issues found" comment from claude[bot]
# Claude posts a comment with this exact message when review passes
CLAUDE_COMMENTS=$(gh api "repos/${{ github.repository }}/issues/$PR_NUMBER/comments" --jq '[.[] | select(.user.login == "claude[bot]") | .body] | join("\n")')

CLAUDE_APPROVED="false"
if [ "$CLAUDE_STATUS" == "success" ] && echo "$CLAUDE_OUTPUT" | grep -q "No issues found. Checked for bugs and CLAUDE.md compliance"; then
if echo "$CLAUDE_COMMENTS" | grep -q "No issues found. Checked for bugs and CLAUDE.md compliance"; then
echo "Claude review found: No issues"
CLAUDE_APPROVED="true"
else
echo "Claude review: Issues found or review not complete"
# Check if claude-review check status for debugging
CLAUDE_STATUS=$(gh api repos/${{ github.repository }}/commits/$HEAD_SHA/check-runs --jq '.check_runs[] | select(.name == "claude-review") | .conclusion' | head -1)
echo "Claude review check status: $CLAUDE_STATUS"
fi
echo "Claude approved: $CLAUDE_APPROVED"

Expand Down
9 changes: 9 additions & 0 deletions .scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,12 @@ annotations:
- token-permissions
reasons:
- reason: not-applicable # Write permissions required for test reporting and release automation

# Branch protection: Using GitHub Rulesets instead of classic branch protection
# - Rulesets require 1 approver and code owner review
# - "last push approval" disabled to allow auto-approve bot to work
# - "apply to administrators" handled via bypass_actors: [] in rulesets
- checks:
- branch-protection
reasons:
- reason: not-applicable # Using GitHub Rulesets with auto-approve bot requiring last_push_approval disabled