pr-finisher

Drives open pull requests to merge-ready state by resolving reviews, validating locally, and fixing mergeability.

5.1k|530|Updated Aug 12, 2025
One-click install
npx skills add https://github.com/github/gh-aw --skill pr-finisher
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pr-finisher
Source: https://github.com/github/gh-aw/tree/main/.github/skills/pr-finisher
Command: npx skills add https://github.com/github/gh-aw --skill pr-finisher

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Open pull requests often stall on unresolved review threads, failing checks, and merge conflicts, requiring tedious manual follow-up before they can be merged. This Skill automates that final push to a merge-ready state from within a GitHub Copilot cloud agent, without ever merging the PR itself.

Core Features & Use Cases

  • Review Resolution: Addresses every unresolved review thread (including github-actions[bot] comments) by making code changes, replying, and resolving threads, delegating to the copilot-review skill.
  • Local Validation Gate: Runs make fmt, make lint, make test-unit, and make test as the authoritative correctness signal, since agent pushes do not re-trigger CI.
  • Mergeability Management: Detects and resolves CONFLICTING and BEHIND states, and root-causes prior CI failures from logs.
  • Use Case: A Copilot cloud agent session picks up a PR with three unresolved review comments and a failing lint check; the skill fixes the code, replies to and resolves each thread, pushes the commits, and reports the PR as ready for human merge with a CI re-trigger hand-off note.

Quick Start

Use the pr-finisher skill to drive the pull request for the current branch to a merge-ready state and report what still needs a human.

Frequently Asked Questions about pr-finisher

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

FAQPage Schema
How do I get a pull request ready for merge automatically?

Run this skill against the PR for the current branch. It resolves all review threads with replies, runs local make fmt/lint/test validation, fixes merge conflicts or BEHIND state, pushes every change, and prints a merge-readiness summary.

How do I resolve GitHub review threads from a Copilot agent?

The skill queries reviewThreads via GraphQL, resolves threads Copilot already answered substantively, then delegates remaining threads to the copilot-review skill. A thread counts as handled only after both a reply and a resolve succeed.

Can this skill merge the pull request or re-run CI?

No. It never runs gh pr merge, enables auto-merge, or waits on CI. Copilot cloud agent pushes do not trigger workflows, so final green CI requires a human to close/reopen the PR, use workflow_dispatch, or push.

Why does the skill rely on local make targets instead of CI checks?

Because agent pushes do not re-trigger CI, the statusCheckRollup goes stale after each push. Local make fmt, lint, test-unit, and test runs are the only authoritative correctness signal available before pushing.

What happens when a CI failure cannot be reproduced locally?

The failure is classified as infra-only or third-party flake and explicitly flagged in the summary as not locally reproducible. After one or two narrow fix attempts, the skill escalates via ask_user instead of guessing.