Skip to content
Back to skills

Who Blocks This Pr

ASecurity

Analyze a PR to determine which files still need approval and from whom, based on CODEOWNERS and website/config/custom.js. Use when the user asks "who needs to approve", "why is the PR blocked", "who blocks this PR", or similar.

  • 7,278 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added November 13, 2026
businessgitapi

Works with

  • api

Security analysis

A100/100

Scanned November 13, 2026

npx -y skills add fleetdm/fleet --skill who-blocks-this-pr --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Who Blocks This Pr?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Who Blocks This Pr
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/fleetdm-who-blocks-this-pr/badge)](https://www.skillsdirectory.com/skills/fleetdm-who-blocks-this-pr)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: who-blocks-this-pr
description: Analyze a PR to determine which files still need approval and from whom, based on CODEOWNERS and website/config/custom.js. Use when the user asks "who needs to approve", "why is the PR blocked", "who blocks this PR", or similar.
---

# PR Approvals

Quickly determine which reviewers are still needed for a PR and which files they own.

## Step 1: Get the blocking info from GitHub

Run these in parallel:
- `gh pr view <number> --json mergeStateStatus,mergeable,reviewDecision` to check if it's actually blocked
- `gh api repos/<owner>/<repo>/pulls/<number> --jq '.requested_reviewers[].login'` to get **who GitHub is still waiting on**
- `gh pr view <number> --json reviews --jq '.reviews[] | select(.state == "APPROVED") | .author.login'` to see who already approved
- `gh pr view <number> --json files --jq '.files[].path'` to get changed files

If the PR is not blocked, just report that and stop.

## Step 2: Map requested reviewers to files

**IMPORTANT: Distinguish between blocking and non-blocking reviewers.**

- **CODEOWNERS** (repo root) creates **required/blocking** reviews. GitHub's branch protection enforces these. Last matching pattern wins.
- **website/config/custom.js** `githubRepoDRIByPath` and `githubRepoMaintainersByPath` auto-request reviewers but do **NOT** block merges. These are courtesy requests.

For each still-requested reviewer, check whether they are required by a CODEOWNERS pattern that matches a changed file. If they only appear in custom.js, they are requested but not blocking.

## Step 3: Report concisely

Output two sections:

**Blocking (CODEOWNERS-required):**
- Who is still needed, and which files/patterns require their approval

**Requested but not blocking (custom.js DRI):**
- Who was auto-requested, and for which files -- note these don't block the merge

Also note who has already approved and what they covered.

Do NOT give a full breakdown of every file's ownership. Only show what's relevant to the still-requested reviewers.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in business →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.