Get Open Pull Requests Tool
get-open-pull-requests-toolList the team's open pull requests grouped by author, with the signal that shows
what is blocking each one: whether it is awaiting a reviewer, has changes requested,
is approved and ready to merge, is still a draft, is failing CI checks, or is simply
too large for anyone to review. Optionally scope to specific "owner/name" repositories
(e.g. patchstack/hub). Use this to nudge people to merge — lead with the headline.
Human authors include their oldest open PRs with age; bot authors (dependabot etc.)
are collapsed into count-only summaries so a dependency backlog cannot drown out the
PRs a person should act on.
total_oversized and the per-PR oversized flag mark pull requests past the hard
review limits — over 100 files, over 5,000 added or deleted lines, or over 8,000
changed in total. These are the ones a reviewer cannot pick up at all, so they are
named in the headline and sorted to the front of their author's list. Report them as
blocked on being split, not as blocked on a reviewer. The threshold is deliberately
the hard limit rather than the team's line target: an open PR gives no file list, so
the test/docs discount assess-change-fit applies to a numstat cannot be applied
here, and judging against the target would flag changes that check would have passed.
size.category is unknown when the counts were never recorded — that is missing
data, not a small pull request; do not describe it as small.
Set include_bot_details when you are working the dependency queue itself — merging
dependabot PRs, chasing failing bumps — and each bot author gains the PR numbers,
repositories, titles and URLs you need to act, ordered by what can be closed out
first: ready to merge, then failing checks, then oldest.
Check status_freshness before quoting counts: it flags open PRs whose local status
may be stale, and repositories that have not synced pull requests recently — whose
PRs may be missing from these counts altogether. Archived (decommissioned) repositories are excluded — this is a review
queue, and their PRs are nobody's to review.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repositories | No | Optional list of "owner/name" repository slugs to scope to (e.g. ["patchstack/hub", "patchstack/saas"]). Omit to include every active repository on the team. | |
| include_bot_details | No | Include the individual PRs for bot authors (dependabot etc.) instead of counts alone — numbers, repositories, titles and URLs, ordered ready-to-merge first, then failing checks, then oldest. Set this when you are working the dependency queue itself; leave it off when summarising a review queue for people. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bots | Yes | Per bot author: total, awaiting_review, ready_to_merge, failing_checks — plus pull_requests (capped, actionable first) and more_not_shown when include_bot_details was set. | |
| team | Yes | Team name. | |
| authors | Yes | Per human author: totals plus awaiting_review, changes_requested, ready_to_merge, draft, failing_checks, oversized, their open PRs (capped, oversized first then oldest, each with opened_at/days_open, an oversized flag and a size block of additions/deletions/changed_files/category), and more_not_shown. | |
| bot_open | Yes | Open PRs authored by bots (dependabot etc.). | |
| headline | Yes | One-line human/bot summary to lead with when relaying this result. | |
| human_open | Yes | Open PRs authored by people. | |
| total_open | Yes | Total open PRs across the included repositories, bots included. | |
| repositories | Yes | Repository slugs included in the result. | |
| total_oversized | Yes | Human-authored open PRs past the hard review limits (over 100 files, over 5,000 added or deleted lines, or over 8,000 changed). Blocked on being split, not on a reviewer. | |
| status_freshness | Yes | How wrong these counts could be, in both directions. possibly_stale counts open PRs with no status sync or activity in over 30 days (some may already be closed, so counts are an upper bound); repositories_awaiting_sync names active repositories whose PRs have not synced in that time (PRs there may be missing, so counts are a lower bound). note spells out whichever applies, and is null only when neither does. | |
| total_awaiting_review | Yes | Total open PRs blocking on a reviewer, bots included. | |
| unmatched_repositories | Yes | Requested slugs that did not match an active team repository — either not tracked, or archived. |