> ## 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-Repo Analysis

> Catch changes that break another repository in your organization

<Note>
  Cross-repo analysis is enabled per organization on the **Enterprise** plan. [Contact support](mailto:support@gitar.ai?subject=Cross-Repo%20Analysis) to turn it on for your organization.
</Note>

## Overview

Gitar checks your pull request against other repositories in your organization and reports what the change breaks in them.

Repositories are related by more than imports. A route path, an event name, or a database column that two repositories have to agree on ties them together, with no shared package between them.

<CardGroup cols={2}>
  <Card title="Automatic scanning" icon="radar">
    Every relevant repository in your organization, on every review. Nothing to link.
  </Card>

  <Card title="Unlimited repositories" icon="infinity">
    No cap, no per-repository slots, no setup as your organization grows.
  </Card>

  <Card title="Beyond imports" icon="route">
    A route, an event name, or an error code ties two repositories together. No shared package required.
  </Card>

  <Card title="Any code host" icon="code-branch">
    A service in a GitHub repository and a client in a GitLab repository are asserted against each other.
  </Card>
</CardGroup>

## What it catches

| The change                                                                                                       | Impacts                                                                                                             |
| ---------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| <Icon icon="plug" color="#a855f7" size={16} /> A route, a wire field, an enum value, or an error code            | the client still calling it or branching on the value you removed, named by repository, file, and function          |
| <Icon icon="gears" color="#f59e0b" size={16} /> A shared CI action, workflow, or base image                      | the repositories whose builds go red on their next version bump                                                     |
| <Icon icon="code-merge" color="#3b82f6" size={16} /> Code that compiles against a symbol from another repository | that the symbol is not on that repository's default branch yet, only in an unmerged PR or an unpinned branch        |
| <Icon icon="puzzle-piece" color="#ec4899" size={16} /> One side of a feature                                     | the counterpart the other repository never got, like a UI key with no server handler or an event with no subscriber |
| <Icon icon="database" color="#10b981" size={16} /> A table, column, or file layout                               | the downstream job, warehouse model, or migration that has to move with it                                          |
| <Icon icon="tag" color="#ef4444" size={16} /> A published contract, under a patch version bump                   | that callers auto-upgrade into the break, so it needs a major tag or a deprecation window                           |

## How it works

<Steps>
  <Step title="Gitar scans every repository in your organization">
    It narrows the whole organization down to the repositories your change can reach.
  </Step>

  <Step title="Gitar asserts your diff against those repositories">
    Each impact is verified against your PR before you see it.
  </Step>

  <Step title="Gitar reports what breaks and how to keep it working">
    Each finding is anchored on the line in your PR that changed the contract, names the affected repository and the file and function in it that breaks, and gives your options: keep the change backward compatible, or sequence the rollout so nothing breaks at runtime.
  </Step>
</Steps>

<Note>
  Findings are labeled **Cross-Repo** and post inline like any other [code review finding](/features/code-review).
</Note>

## Coverage

Coverage builds as Gitar sees more of your organization, so a review opened the day the feature is turned on may not reach everything yet.

## Naming and excluding repositories

Gitar gets this right in most cases. To customize it, commit `.gitar/cross-repo.md` and describe the relationships in natural language: which repositories depend on this one, what has to stay consistent between them, and what to leave alone.

```markdown theme={null}
`my-org/frontend` and `my-org/mobile` call the API this repository publishes.
`my-org/data-jobs` reads the tables this repository owns.
Ignore `my-org/frontend-archive`.
```

Put the file in your [configuration repository](/configuration/configuration-repository) to apply it across the organization, or in a single repository to scope it there. When both exist, the organization's rules load first and the repository's file adds to them.

## Related

<CardGroup cols={2}>
  <Card title="Code Review" icon="magnifying-glass" href="/features/code-review">
    How findings are posted, resolved, and tracked
  </Card>

  <Card title="Insights" icon="chart-line" href="/features/insights">
    Where the Cross-Repo category is reported across your organization
  </Card>

  <Card title="The Gitar Dashboard" icon="comment" href="/gitar-dashboard">
    The comment the Code Review section lives in
  </Card>

  <Card title="Plans" icon="credit-card" href="/account-billing/plans">
    What each plan includes
  </Card>
</CardGroup>
