Cross-PR Analysis

Enterprise

Two clean merges can still break each other.

Gitar compares a pull request with related open PRs, in the same repository or another connected one, and flags changes that could break behavior the other PR depends on. Your team decides which side to adjust before the changes land.

payments-api #340Remove legacypayment_status field- payment_status: order.legacyStatus,payments-api #352Show payment status onreceipts+ renderStatus( order.payment_status)cross-prCROSS-PRRelated PR: #352#352 adds a caller that still reads payment_statusBoth PRs can merge cleanly. Once both land, receipts render an empty status.→ Change #352 to read status.→ Or keep payment_status in #340 until #352 moves.
The problem

Parallel work collides in behavior, not in lines.

1. No conflict, still broken

2. Reviewed one at a time

3. Order matters

How Gitar solves it

From diff to finding, in three steps.

Find related open changes

During a review, Gitar identifies open PRs whose changes may interact with the PR under review, in the same repository or another connected repository.

Check the shared behavior

Gitar compares the relevant code to identify a mismatch and the conditions under which it would matter.

Report what needs adjusting

Findings appear inline with a cross-pr label and a link to the related PR. The explanation describes the interaction and can suggest changes on either side.

Two clean PRs, one cross-pr finding, and a choice of which side to adjust.
The capability in detail

From two open PRs to one finding.

fields · formats

API changes

One PR changes an API field or response format while another adds a caller reading the previous format.
names · payloads

Events

One PR changes an event name or payload while another adds a handler expecting the previous event.
shared functions

Function behavior

One PR changes a shared function's behavior while another adds a caller relying on how it worked before.
columns · meaning

Database schema

One PR changes a database column or its meaning while another has a query or job using the previous schema.
same repo or connected

Across repositories

Related open PRs are found in the same repository or in another connected repository.
labeled cross-pr

Inline, with a way forward

Findings post inline with a link to the related PR, and can suggest changes on either side so teams coordinate a compatible change or the order the PRs land in.
no outdated findings

Checked before posting

Gitar doesn't publish a finding if the related PR has closed, merged or changed since the comparison.
Dashboard > Cross-PR

Organization dashboard

Enterprise members and admins browse open findings, PRs involved and resolved findings, filtered by repository and time range. On GitLab it's labeled Cross-MR.
Try it yourself

Follow the blueprint.

A step-by-step developer guide from Sonar for setting up and trying Cross-PR Analysis.

Blueprint

Gitar Risk Triage and Cross-PR Analysis for sensitive code

Mark sensitive paths high risk, catch two open pull requests that break only when both merge, and auto-approve only low-risk changes.

Don't just review. Ship.

Free 14-day trial. No credit card required.