What you’ll build
- A dashboard of open PRs with CI status and graph impact.
- A list of PR pairs that touch the same communities.
- A triage view that suggests what to review first.
Setup
You need the GitHub CLI, signed in withgh auth login, and a graph of the repository:
Step 1: List open PRs with impact
v8) unless you pass --base. The impact column counts the graph nodes and communities a PR’s changed files reach. A PR that reaches 122 communities needs a different reviewer than one that reaches 8.
Step 2: Find colliding PRs
Step 3: Triage
GRAPHIFY_TRIAGE_BACKEND if set, otherwise the first backend with an API key (Claude, Kimi, OpenAI, then Gemini), and falls back to a local Ollama model. Add --wrong-base to flag PRs aimed at the wrong branch.
Step 4: Look at one PR
graphify affected from Plan a refactor on the functions it changes.
Step 5: Agree a merge order
For each colliding pair:- Merge the smaller-impact PR first.
- Ask the other author to rebase and rerun their tests.
- Rebuild the graph with
graphify update .and check the second PR’s impact again.
When it goes wrong
Error: gh ... and exit code 1. The command shells out to gh. Run gh auth status, and check that you can read the repository with gh pr list --repo OWNER/REPO.
Impact shows –. The PR changed files that aren’t in the graph, such as docs or config, or the graph is stale. Rebuild with graphify update ..
Triage failed: No module named 'openai'. The table still prints, but triage needs an LLM client. Install the extra for your backend, for example uv tool install "graphifyy[openai]", and set its API key.
Wrong base branch. Pass --base main (or -b main) when your repository’s default branch isn’t the one PRs target.
Production patterns
- Run
graphify prs --triageat the start of a review session and share the output in your team channel. - Use
--worktreesto see which PR branches are checked out locally. - Agents can call the same views over MCP: the local server exposes
list_prs,get_pr_impactandtriage_prs. See Self-host a shared MCP. - In Graphify, the hosted product, connected repositories get reviews on each PR, with colliding PRs flagged.
Complete example
What you built
Your team has a shared, graph-backed view of the PR queue: what each PR reaches, which ones collide, and a merge order that keeps the default branch green.FAQ
Can two PRs collide without a git conflict?
Can two PRs collide without a git conflict?
Yes. Two PRs that change different callers of the same function won’t conflict in git but can still break each other.
Which PR should we review first?
Which PR should we review first?
Run triage. It asks an LLM to order the queue, and can fall back to a local Ollama model.
In what order should colliding PRs merge?
In what order should colliding PRs merge?
Merge the smaller-impact PR first. Then the other author rebases and reruns their tests, and you rebuild the graph with
graphify update . to check the second PR’s impact again.Can AI agents see the PR queue too?
Can AI agents see the PR queue too?
Yes. The local MCP server exposes
list_prs, get_pr_impact and triage_prs, so agents get the same views as the command line.What do I need?
What do I need?
The GitHub CLI signed in with
gh auth login, and a graph of the repository.Next steps
Colliding pull requests
How Graphify detects PRs that touch the same code.
Graph impact comment on every PR
Post the impact on each PR automatically.
Try it in Graphify
We build and host the graph for you, and review your pull requests with it. The Free plan (up to 3 repositories) needs no card. Pro and Teams start with a 14-day trial, card required.