> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gitar.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Cross-PR Analysis

> Catch changes that could break logic another PR relies on

## Overview

Gitar compares a PR with related open PRs to spot changes that could break behavior another change depends on. Findings help teams decide which side needs adjusting before the changes land.

Two PRs can affect the same logic without editing the same lines. One might remove an API field while another adds a caller that still expects it.

## What it catches

| One PR changes | Another PR depends on |
| - | - |
| An API field or response format. | A caller reading the previous format. |
| An event name or payload. | A handler expecting the previous event. |
| A shared function's behavior. | A new caller relying on its earlier behavior. |
| A database column or its meaning. | A query or job using the previous schema. |

These checks concern how changes work together. A clean merge can still introduce a behavior mismatch.

## How it works

<Steps>
  <Step title="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.
  </Step>

  <Step title="Check the shared behavior">
    Gitar compares the relevant code to identify a mismatch and the conditions under which it would matter.
  </Step>

  <Step title="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.
  </Step>
</Steps>

Teams can use the finding to coordinate a compatible change or decide the order in which the PRs should land. Findings follow the same [feedback and resolution flow](/features/code-review#providing-feedback) as other code review findings.

## Inspect Cross-PR findings

Enterprise organization members and admins can open **Dashboard -> Cross-PR** to browse recorded findings across the organization.

On GitLab, the dashboard is labeled **Cross-MR** and links to related merge requests.

| Summary | What it shows |
| - | - |
| Open findings. | Findings open within the selected repository and time range. |
| PRs involved. | Distinct PRs on either side of the recorded findings in that scope. |
| Resolved findings. | Findings resolved within that scope. |

Filter by repository and time range to scope the summary. Status filters and text search narrow the findings list.

Select a finding to inspect the explanation and the related PR. Expand **Code evidence and revisions** for the recorded file references and compared revisions, when available.

The detail view includes suggested adjustments on each side when the review recorded them. Links lead back to the PRs so the teams can coordinate the next change.

## Reading recorded comparisons

Findings describe the revisions compared at the recorded time. They are not a current merge verdict, and changes to the related PR do not automatically refresh an existing finding.

Gitar does not publish a new finding if the related PR has closed, merged, or changed since the comparison. Previously recorded findings remain available in the dashboard.

## Related

<CardGroup cols={2}>
  <Card title="Cross-Repo Analysis" icon="code-branch" href="/features/cross-repo-analysis">
    Check changes against shared contracts in other repositories.
  </Card>

  <Card title="Knowledge" icon="book-open" href="/features/knowledge">
    Bring team conventions and lessons from earlier reviews into the review.
  </Card>

  <Card title="Code Review" icon="magnifying-glass" href="/features/code-review">
    How findings are posted and resolved.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.