# Merge Pull Request

> Use when merging a single GitHub pull request. Handles pre-flight checks, waits for CI, and executes the merge with the repo's default method or merge queue.

- Skill: `landonschropp/merge-pull-request` (Agent Skill, multi-file: 5 files)
- Install (CLI): `npx skillmds@latest add landonschropp/merge-pull-request`
- Raw SKILL.md: https://api.skillmd.com/api/skills/landonschropp/merge-pull-request/raw
- Safety review: PASS (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: LandonSchropp (https://skillmd.com/u/landonschropp)
- Updated: 2026-08-19
- Page: https://skillmd.com/skills/landonschropp/merge-pull-request

---


# 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 on approvals, I'll use `--admin`"   | Admin bypass is a user decision, not the skill's. Surface the block and stop. |

