wait-merge

Poll GitHub PR state until MERGED or CLOSED and report the outcome.

Updated Jun 20, 2026
One-click install
npx skills add https://github.com/EdgeVector/last-stack --skill wait-merge
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wait-merge
Source: https://github.com/EdgeVector/last-stack/tree/main/skills/wait-merge
Command: npx skills add https://github.com/EdgeVector/last-stack --skill wait-merge

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Waiting on PR merges can be fragile when CI or merge queues cause transient failures. This skill interprets PR state rather than relying on exit codes, enabling reliable reporting even during churn.

Core Features & Use Cases

  • Interpret PR state from GitHub to determine terminal outcomes (MERGED, CLOSED) regardless of checks.
  • Re-assert auto-merge when a clean, approved PR stalls, avoiding unnecessary failures.
  • Handles common queue scenarios (BEHIND, DIRTY, BLOCKED) and persist across polls, with safe fallbacks.
  • Use Case: you want to monitor PR N in a repository and automatically report when it lands, without false negatives.

Quick Start

Monitor PR number N until it merges and report the final status.

Frequently Asked Questions about wait-merge

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I wait for a GitHub PR to merge without failing on transient CI errors?

To wait for a GitHub PR to merge reliably, you interpret the PR state rather than relying on CI exit codes. This approach re-checks until a terminal state like MERGED or CLOSED is reached, avoiding false negatives during transient queue churn.

What is the best way to monitor a GitHub pull request until it lands?

The best way to monitor a GitHub pull request until it lands is using robust polling logic that interprets the final outcome. This handles merge queue scenarios like BEHIND or BLOCKED and re-checks until the PR reaches a terminal state.

Why does my PR merge automation fail when checks are transient?

PR merge automation fails on transient checks when it relies on CI exit codes instead of PR state. By interpreting the PR state directly and waiting for it to settle, you avoid false failures caused by merge queue churn or transient CI updates.

Can I monitor pull requests on any GitHub repository with merge queues?

Yes, you can monitor pull requests on any GitHub repository with merge queues. The polling logic handles behind-queue scenarios, interprets PR states like DIRTY or BLOCKED, and safely falls back while re-asserting auto-merge if a clean PR stalls.

How do I handle a stalled GitHub PR that is approved but not merging?

To handle a stalled GitHub PR that is approved but not merging, you can re-assert auto-merge. This action avoids unnecessary failures and continues robust polling until the PR settles into a terminal state like MERGED or CLOSED.