Skip to main content
Closed beta. Cross-repository review is part of AI code review, which is in closed beta and enabled per organisation on request. Contact support to have it turned on for your organisation.
A diff on its own hides the most valuable class of finding: you changed this, and the code that depends on it is not in front of you. The AI code review pulls that code in before it answers, so it can raise the finding instead of leaving it to whoever greps for it later. This page covers what the review reads beyond the diff, how to tell it which repositories belong together, and how to declare which pull request has to merge first.

Callers in the same repository

For each declaration the diff changes, Ankra searches the repository for the other places that name appears and reads the best candidates into the prompt, at the reviewed commit. That is what lets a review say “three of this function’s five callers are in files this pull request does not touch” - a finding the diff alone cannot support.

Repositories deployed alongside this one

A pull request can be correct, green, and still break a different repository: it removes a route, and the client that calls it lives elsewhere with its own pipeline that has never heard of this change. Neither side disagrees until the deploy. So for names this diff removes, and for contracts it changes, Ankra searches the repositories your organisation relates to this one and shows the review any file that still refers to them. A removal is reported as a possible breaking change on the line that does the removing; a changed contract is reported only where the file shows a real dependency on what changed.
The repository set is read from your organisation’s own rows, never from the model and never from the text of the pull request. A pull request cannot name a repository to have it read, and a search result pointing outside the set is discarded.
Silence here is not an all-clear. The search is best effort. A rate limit, a failed request, a provider without code search, or an organisation with nothing co-installed all produce no section at all rather than one reading “nothing else uses this” - because a review that conflated those would tell you a removal is safe on the strength of a request that failed. Absence of a cross-repository finding is not evidence that nothing is affected.

The other half of the change

A cross-repository change is almost never one pull request. The API removes a route in one repository and the client stops calling it in another, and the second half sits on a branch until the first has landed. Code search cannot see that branch, so on its own the pass above would say “the client still calls this” about a repository whose fix is already open. So the review also reads the companion pull requests of the one under review, and shows each as it stands on its own branch: The review uses this to say which side has to merge first, and to stop asking you to confirm what the platform can read. A mention reply (@ankraai) sees the same companions, so “the other half is in that pull request” is checked rather than taken on your word.
A companion absent from the review is not evidence that none exists. Only declared lines and links GitHub recorded are read, up to three, and a companion that could not be read is left out rather than shown as unchanged.

Relating two repositories directly

The two automatic sources only know what is deployed on the same cluster. A client and the API it calls, a shared library, or a client that runs outside Ankra have no cluster in common, so state those relationships directly: AI → Settings → Connections → Source control & AI review, open a GitHub connection, and use Related repositories at the bottom of its panel. This adds to the automatic sources; it does not replace them.
1

Pick both repositories

Both are chosen from drop-downs listing the repositories that GitHub App installation can reach. The review reads them with that installation’s token, so a repository it cannot reach would contribute nothing and is refused. If one is missing, add it to the GitHub App installation first.
2

Relate them

The pair is saved immediately and appears in the list above, shown as repo-a ↔ repo-b.
The list is not portal-only, and both other surfaces hold the same rules: organisation admin, one installation, both repositories reachable by it.
The CLI finds the installation from your GitHub App credential, so you name one only when the organisation has several: --credential github-app-my-org. remove also takes a relationship’s ID from list, and it removes the pair whichever order it was stated in. Over MCP the three are list_related_repositories, relate_repositories and unrelate_repositories. They are addressed by the GitHub App installation’s numeric id, which list_credentials reports for every GitHub App credential. The two writes need the mcp:write scope and an organisation admin’s token: the MCP surface does not carry the chat lanes’ permission gate, so the tools check admin themselves.

Declaring merge order

Where a removal or a contract change is genuinely breaking, the risk is often the deploy sequence rather than the change, and the review will suggest declaring the order with a line in the pull request description:
Ankra reads the line only when it starts a line, so ordinary prose mentioning “depends on” cannot hold anything. It accepts the short owner/repository#number form or a full pull request URL, up to five per pull request. Order is declared rather than inferred on purpose: inferring which side is the producer means guessing whether the change is additive or breaking, a judgement the author has already made, and two halves each waiting for the other is a deadlock. The line does two things. The review reads it on every turn and shows the declared pull request as the other half of the change, so the finding that suggested it is answered by the next review rather than by you. And merge-when-green holds this merge until the declared pull request has merged.
The merge hold needs Merge when green on the installation, off by default and switched on next to the AI mode control on the installation’s row, or over the API - see Merge when green. With it off, the line holds nothing and you sequence the merges yourself; the review still reads it either way.

Next

Switch the review on and choose what it posts in AI code review.