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
feat(ci): migrate from Claude to GitHub Copilot code review
- Remove claude-code-review.yml and claude.yml workflows
- Update auto-approve.yml to check Copilot inline comments instead of Claude
- Copilot code review is now configured via repository ruleset
This change reduces CI costs and avoids potential account suspension from
running Claude ~100 times/day across different GitHub runners.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: JasonXuDeveloper - 傑 <jason@xgamedev.net>
if echo "$CLAUDE_COMMENTS" | grep -q "No issues found. Checked for bugs and CLAUDE.md compliance"; then
59
-
echo "Claude review: No issues found"
60
-
CLAUDE_APPROVED="true"
58
+
COPILOT_OK="false"
59
+
if [ "$COPILOT_COMMENTS" -eq 0 ]; then
60
+
echo "Copilot review: No issues found (0 inline comments)"
61
+
COPILOT_OK="true"
61
62
else
62
-
echo "Claude review: Issues found or not yet complete"
63
+
echo "Copilot review: Found $COPILOT_COMMENTS inline comments - issues need addressing"
63
64
fi
64
-
echo "Claude approved: $CLAUDE_APPROVED"
65
+
echo "Copilot OK: $COPILOT_OK"
65
66
66
67
# Check Unity Tests status (commit status, not check run)
67
68
UNITY_STATUS=$(gh api repos/${{ github.repository }}/commits/$HEAD_SHA/status --jq '.statuses[] | select(.context == "Unity Tests") | .state' | head -1)
@@ -77,11 +78,11 @@ jobs:
77
78
fi
78
79
79
80
# Determine if we should approve
80
-
if [ "$CLAUDE_APPROVED" == "true" ] && [ "$UNITY_STATUS" == "success" ]; then
81
-
echo "All required checks passed and Claude found no issues!"
81
+
if [ "$COPILOT_OK" == "true" ] && [ "$UNITY_STATUS" == "success" ]; then
82
+
echo "All required checks passed and Copilot found no issues!"
82
83
echo "should_approve=true" >> $GITHUB_OUTPUT
83
84
else
84
-
echo "Required checks not yet passed or Claude found issues"
85
+
echo "Required checks not yet passed or Copilot found issues"
85
86
echo "should_approve=false" >> $GITHUB_OUTPUT
86
87
fi
87
88
@@ -111,6 +112,6 @@ jobs:
111
112
run: |
112
113
PR_NUMBER="${{ steps.pr.outputs.number }}"
113
114
114
-
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)."
115
+
gh pr review $PR_NUMBER -R ${{ github.repository }} --approve --body "Auto-approved: Copilot review found no issues and Unity Tests passed (or were skipped for non-code changes)."
0 commit comments