merge-pull-requestlisted
Install: claude install-skill LandonSchropp/agent-toolkit
# Merge Pull Request
Pass `--pull-request-url <url>` to each script. Use a 5-minute tool timeout when running the polling scripts. If a script times out, check for any issues, then re-run it — repeat up to 5 times before giving up.
## Process
1. **Wait until ready:** Run `scripts/wait-for-pull-request-to-be-ready.sh`. Waits for CI to complete and verifies all static conditions (not draft, no conflicts, reviews approved). Exits immediately on any permanent blocker — stop and surface the error to the user.
2. **Merge:** Run `scripts/merge-pull-request.sh`. Detects whether the target branch uses a merge queue — if so, adds the pull request to the queue without a strategy flag. Otherwise detects the repo's allowed methods (squash > merge commit > rebase) and merges with `--delete-branch`.
3. **Confirm:** Run `scripts/wait-for-pull-request-to-be-merged.sh`. Polls until the pull request state is `MERGED`. Required when a merge queue is involved since the merge completes asynchronously.
## Rationalizations
| Thought | Reality |
| ---------------------------------------------------------------- | ----------------------------------------------------------------------------- |
| "CI is almost done, I'll skip wait-for-pull-request-to-be-ready" | Use the script. It handles the wait. |
| "The pull request is blocked