Resolve merge conflicts in bulk for the current repo.
Intent
- Reduce toil by processing all open PRs authored by the authenticated user.
- Reuse the
resolve-merge-conflictsskill for each PR.
Workflow
- Create a
TodoWritelist for repo discovery, PR discovery, and per-PR execution. - Validate prerequisites:
git rev-parse --is-inside-work-treegh auth status- Clean working tree required before starting (
git status --porcelain).
- Identify repo + actor:
repo=$(gh repo view --json nameWithOwner --jq .nameWithOwner)me=$(gh api user --jq .login)
- Discover target PRs (open, authored by current user in current repo):
gh pr list --repo "$repo" --state open --author "$me" --json number,url,title,updatedAt,headRefName,baseRefName- If none, stop with a short report.
- Process in most recently updated order.
- For each PR:
- Ensure clean working tree before starting that PR.
- Invoke the
resolve-merge-conflictsskill with that PR URL/number. - If successful, push branch updates (
git pushon the checked-out head branch). - Record success/failure and key notes.
- If one PR fails, continue to next PR unless the failure is global (auth outage, broken repo state).
- End with a compact report:
- repo and user,
- PRs processed,
- success count, failure count, skipped count,
- per-PR status with next action for failures.
Rules
- Do not skip directly to blanket
ours/theirsconflict resolution. - Do not discard unrelated local changes.
- Keep each PR isolated, never carry partial conflict state into the next PR.
- If
resolve-merge-conflictsis unavailable, apply its workflow inline for each PR.