Prompt file imported from gc-da11yn/gc-da11yn.github.io (
.github/prompts/merge-pr.prompt.md). Fill in{{pr}}before use. Copyright stays with the author.
Merge a pull request after checking readiness.
{{pr}}
Steps
- Parse the PR reference to extract owner, repo, and PR number.
- Fetch PR metadata with #tool:mcp_github_github_pull_request_read (method:
get). - Check merge readiness:
- Is the PR approved? (at least one approval, no outstanding "changes requested")
- Is CI passing? (all required checks green)
- Are there merge conflicts?
- Is the PR a draft? (cannot merge drafts)
- Any branch protection rules that block merge?
- If not ready, explain what's blocking:
PR #{number} is not ready to merge: - Missing required review from @alice - CI check "tests" is failing - Merge conflicts with base branch Want me to help resolve any of these? - If ready, present merge options via #tool:ask_questions:
- Squash and merge (recommended -- clean history, single commit)
- Create a merge commit (preserves all commits)
- Rebase and merge (linear history, replays commits)
- Show the default merge commit message and offer to customize:
Merge commit message: {title} (#{number})
{PR description summary}
- Final confirmation:
Will merge PR #{number} "{title}" into
{base}using squash and merge. This action cannot be undone. - Confirm with #tool:ask_questions: Merge (recommended), Edit message, Cancel.
- Merge the PR.
- Offer post-merge actions:
- Delete source branch -- clean up the merged branch
- Close linked issues -- if the PR fixes issues, offer to close them
- Update briefing -- note the merge in today's briefing
- Confirm with link to the merged PR.
Safety: Always show what will happen and get explicit confirmation. Never auto-merge.