Skip to content
This repository was archived by the owner on Apr 5, 2026. It is now read-only.

Commit 701b319

Browse files
HerbHallclaude
andcommitted
feat: add Copilot auto-review setup gotchas
Add KG#92: Copilot auto-review toggle is UI-only, not fully configurable via REST API. After creating a ruleset via API, the UI toggle may need manual confirmation. Add KG#93: Rulesets and branch protection review requirements conflict. Using both creates a double review gate. Use rulesets for review requirements (enables Copilot) and branch protection only for CI status checks. Includes protection architecture table documenting which system should manage each concern. Closes #193 Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 5a7f43e commit 701b319

1 file changed

Lines changed: 55 additions & 2 deletions

File tree

claude/rules/known-gotchas.md

Lines changed: 55 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
description: Known gotchas and platform-specific issues. Read when debugging unexpected behavior.
33
tier: 2
4-
entry_count: 91
5-
last_updated: "2026-03-03"
4+
entry_count: 93
5+
last_updated: "2026-03-05"
66
---
77

88
# Known Gotchas
@@ -1318,3 +1318,56 @@ npx markdownlint-cli2 "**/*.md" "#**/node_modules"
13181318
```
13191319

13201320
**Scope:** Affects Makefile `lint-md` targets, `scripts/pre-push` hooks, and CI workflow markdownlint steps. Update all three locations when fixing.
1321+
1322+
## 92. Copilot Auto-Review Is UI-Only (No REST API)
1323+
1324+
**Added:** 2026-03-05 | **Source:** Runbooks | **Status:** active
1325+
1326+
**Platform:** GitHub
1327+
**Issue:** The "Automatically request Copilot code review" toggle in GitHub rulesets is only available through the GitHub web UI. The REST API can create the `copilot_code_review` rule type with `review_on_push: true`, but the UI toggle may still need manual confirmation. There is no REST API endpoint to read or write this setting independently.
1328+
**Diagnosis:** After creating a ruleset via API with `copilot_code_review` rule, Copilot doesn't review PRs. The ruleset exists but the UI toggle appears unchecked.
1329+
**Fix:** After creating the ruleset via API, manually confirm the setting:
1330+
1331+
1. Go to repo Settings > Rules > Rulesets > "Copilot PR Review"
1332+
2. Click Edit on "Require a pull request before merging"
1333+
3. Under "Additional settings", verify "Require review from GitHub Copilot" is checked
1334+
4. Also enable "Review new pushes" for re-review on each push
1335+
5. Save changes
1336+
1337+
**URL pattern:** `https://github.com/OWNER/REPO/settings/rules/RULESET_ID`
1338+
**Workaround:** Create a test PR with a real file change to verify Copilot reviews it after setup.
1339+
1340+
## 93. Rulesets and Branch Protection Review Requirements Conflict
1341+
1342+
**Added:** 2026-03-05 | **Source:** Runbooks | **Status:** active
1343+
1344+
**Platform:** GitHub
1345+
**Issue:** GitHub rulesets and classic branch protection are separate systems that can both require PR reviews independently. If a ruleset requires 1 approving review (for Copilot auto-review) AND branch protection also requires 1 review, the effective requirement becomes 2 reviews -- one from each system. For solo maintainers, this blocks all PRs.
1346+
**Diagnosis:** PR has Copilot approval but still shows "Review required" and cannot be merged. `gh pr view --json reviews` shows 1 approval but merge is blocked.
1347+
**Fix:** Use rulesets for review requirements (enables Copilot auto-review) and branch protection only for CI status checks. Remove `required_pull_request_reviews` from branch protection:
1348+
1349+
```bash
1350+
# Remove review requirement from branch protection
1351+
# Keep only status checks
1352+
gh api repos/OWNER/REPO/branches/main/protection -X PUT \
1353+
--input - << 'JSON'
1354+
{
1355+
"required_status_checks": {
1356+
"strict": true,
1357+
"contexts": ["Build", "Lint", "Test"]
1358+
},
1359+
"enforce_admins": false,
1360+
"required_pull_request_reviews": null,
1361+
"restrictions": null
1362+
}
1363+
JSON
1364+
```
1365+
1366+
**Protection architecture:**
1367+
1368+
| Concern | System | Reason |
1369+
|---------|--------|--------|
1370+
| CI status checks | Branch protection | API-configurable, well-supported |
1371+
| PR review requirement | Ruleset | Enables Copilot auto-review |
1372+
| Copilot auto-review | Ruleset (UI toggle) | Only available in rulesets |
1373+
| Auto-merge | Repo setting | Required for release-gate workflow |

0 commit comments

Comments
 (0)