This automation reviews the open PR queue and sorts each PR by its real blocking state, such as waiting on author, reviewer, or CI. It helps teams know where attention should go next.
- Reads a bounded set of open pull requests from the current repository or the explicitly provided repository scope.
- Expands each PR with review state, unresolved threads when available, checks, conflicts, labels, reviewers, and recent activity.
- Adds a short plain-language summary so the queue is understandable without opening every PR.
- Classifies each PR into states such as
needs author response,needs reviewer,blocked by CI, orready for maintainer. - Produces a compact routing report with the next best owner or action for each PR.
sequenceDiagram
participant Agent
participant GitHub
Agent->>GitHub: Read PR queue, review state, checks, conflicts
GitHub-->>Agent: PR metadata, review signals, check state
Agent->>GitHub: Read unresolved threads and CODEOWNERS when needed
GitHub-->>Agent: Review-thread evidence and owner hints
Note over Agent: Report-only by default
- maintainers need a daily or weekly PR queue sweep
- teams want a review-routing digest before a review block
- you want open PRs separated by real blocking state instead of treated as one undifferentiated queue
- GitHub read access for pull requests, issues, reviews, and checks
- GitHub MCP, a GitHub connector, or
ghCLI access
- Open Cursor Automations.
- Name your automation and paste github-pr-review-router.md as the automation prompt.
- Add GitHub access with read permission for pull requests, reviews, issues, and checks.
- Set a schedule or run manually, then create the automation.
- Add the GitHub plugin to Codex,
ghCLI, or a GitHub MCP server with read access for pull requests, reviews, checks, and repository search. - Click
Automation>New Automation. - Name your automation and paste github-pr-review-router.md as the automation prompt.
- Set the schedule or run manually and save the automation.
- Add a GitHub MCP server in Claude Code and authenticate it, or make
ghavailable in the runtime as the main GitHub interface. - For repeated checks in an open Claude Code session, use
/loop, for example:
/loop weekdays at 9am Follow the instructions in automations/github-pr-review-router/github-pr-review-router.md
- For durable Claude-managed automation, use
/scheduleor create a Routine inclaude.ai/code/routines.
| Setting | Default |
|---|---|
| Repository scope | current repository |
| PR scope | open pull requests |
| First-pass PR cap | 30 |
| Stale threshold | 3 days |
| Delivery | markdown report or preview |
| Writes | none |
Keep the automation report-only. If unresolved threads cannot be read, say that clearly instead of inferring readiness, and prefer short summaries plus the next best action over dense status dumps.
Add policy only when GitHub state alone is not enough, for example:
Treat "changes requested" as needs author response until every requested change thread is resolved or explicitly superseded.
Do not route bot-authored dependency PRs into the main reviewer queue unless they are failing or older than 3 days.
Prioritize PRs that block a release branch or have been waiting on reviewer action for more than 2 business days.
