Skip to content
Closed
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
18 changes: 15 additions & 3 deletions docs/agentic-workflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -362,16 +362,28 @@ EOF
With `enforce_admins: true` and 1 required approval, you can't merge your own PRs without an external approver. Workaround:

```bash
# Temporarily disable enforce_admins
# 1. FIRST: Disable auto-merge on all other open PRs (CRITICAL — race condition, see #83)
for pr in $(gh pr list --state open --json number,autoMergeRequest --jq '.[] | select(.autoMergeRequest != null) | .number'); do
gh pr merge --disable-auto "$pr"
done

# 2. Temporarily disable enforce_admins
gh api repos/OWNER/REPO/branches/main/protection/enforce_admins -X DELETE

# Admin merge
# 3. Admin merge
gh pr merge <PR> --merge --admin --delete-branch

# Re-enable
# 4. Re-enable enforce_admins
gh api repos/OWNER/REPO/branches/main/protection/enforce_admins -X POST
Comment on lines +370 to 377

# 5. Re-enable auto-merge on those PRs
for pr in <saved list>; do
gh pr merge --enable-auto --merge "$pr"
done
Comment on lines +365 to +382
```

> **Warning**: Skipping steps 1 and 5 allows any PR with auto-merge + green CI to merge without required approvals during the enforce_admins disable window. PR #69 merged with zero approvals due to this race condition (issue #83).

This is a known limitation for solo repos. Agent PRs don't need this — the quality gate approves them.

</details>
Expand Down
Loading