/next/ai/settings/gateway), in its GitHub, GitLab and Bitbucket sections. What the reviews said afterwards is on Ankra AI → Code reviews - see Read what the reviews found.
Nothing runs until you switch it on. Every capability on a new connection is off. Installing the GitHub App, connecting a GitLab token, or authorising a Bitbucket workspace gives Ankra access, and nothing more: no review is posted, no mention is answered, and no preview is deployed until an owner or admin, or another role with the
ai.manage permission, turns the switch on for that connection or for a single repository.Before you start
- A role that may manage Ankra AI. The
ownerandadminroles hold theai.managepermission, and a custom role can be given it. Members can open Gateway connections and read every setting, and the page says Your role can look but not change. Owners and admins connect apps, choose AI modes and set review rules. - To connect GitLab, a role that may write credentials. Without it, the Connect GitLab card is not shown.
- To read Code reviews, a role that can read the organisation. Without it, the page reads Your role cannot read code reviews.
Connect a provider
Each provider has its own section on Gateway connections.- GitHub
- GitLab
- Bitbucket Cloud
In the GitHub section, press Install the GitHub App. GitHub asks which account and which repositories the App may reach, then brings you back to Gateway connections.The installation now shows as a card in the GitHub section. One account can carry several installations, and each is configured separately; to add another, press Install the GitHub App at the top of the section. See the GitHub integration for the permissions the App requests and how to change which repositories it covers.GitHub is the only provider that also offers PR preview environments.
AI mode: Ask or Agent
Every connection carries an AI mode that bounds what Ankra AI may do when it is talked to from that repository. It is separate from the capability switches: the switches decide whether Ankra AI answers, the mode decides how far the answer may go. Pick Ask or Agent at the top of the card.
A connection in Agent mode is marked Can act. Automatic review events themselves stay read-only whatever the mode: a review comments, and a proposed fix arrives as a separate pull request you review like any other.
On GitLab and Bitbucket Cloud, Ankra cannot open a pull request, so an Agent-mode reply proposes the fix with a branch name and a commit message instead of offering one.
Merge when green
A GitHub installation also carries a Merge when green switch beside the mode. With it on,@ankraai merge when green in a pull request comment, the merge button in Ankra and the merge tool ask Ankra to merge a pull request once its pipeline passes, its reviews are clear and it is approved. A comment is acted on only when it comes from a member of your organisation who linked GitHub through Ankra, holds the pipelines.operate permission, and is the pull request’s author, can write to the repository on GitHub or is an organisation administrator. A pull request from a fork is never merged this way. A Depends-on line in the description holds the merge until the pull request it names is merged.
The repository table
Each card opens on a Repositories table of every capability, with two kinds of row.- All repositories, marked Default, is the first row. It carries the connection-wide values, and every repository with no rule of its own follows it.
- A repository rule is one row per repository that should differ. Under the table, choose the repository in Repository (or type its path,
owner/repository, when Ankra cannot list the installation’s repositories) and press Add rule. The new row starts as a copy of the default row. Press the × at the end of a row to remove its rule; the repository follows the default row again.
set changes only the switches you pass (--review, --mentions, --previews, --model, --review-drafts, --max-reviews-per-pr; turn one off with =false) and keeps the rest of the repository’s rule, or the default row’s values when the repository has no rule yet. The connection is found from the repository; when that is ambiguous, pass --binding <provider>/<id> as list shows it. list --reachable also lists the repositories each GitHub App installation can see, and unset removes the rule so the repository follows the default row again. Listing needs organisation membership; set and unset need an organisation admin.
Over the API, an organisation admin’s API token can send PUT /api/v1/org/ai-gateway/scm-bindings/{provider}/{binding_external_id}/repo-overrides with repo_full_name, ai_review, mention_replies and pr_previews to add or change a rule, and DELETE on the same path with ?repo_full_name=<owner>/<repository> to remove it. GET /api/v1/org/ai-gateway/scm-bindings lists each connection’s binding_external_id and its current rules; the API Reference has the full request shape.
Rules are keyed by the repository path, lowercased. For GitLab, use the full project path including subgroups, up to 20 levels deep - for example
my-group/my-subgroup/my-project.What each column means
When nothing picks a review model - not the repository’s Application AI settings, not a repository rule, not the default row - the review runs on your organisation’s AI code review model under Models for each AI feature. Unless an admin changes it, that follows the Think tier: Claude Haiku 5.5 on Ankra’s provider, or your own Think model when the organisation runs on its own key. A model list an admin has edited keeps the Think model it was saved with. Every pull request gets that model, whatever the size of its diff.
Review instructions
The Review instructions section, below the code hosts on Gateway connections, lists each connected installation with the first line of its instructions, or No instructions yet. Press Add instructions (or Edit when it has some) to open Review instructions for installation. It is what the reviewer should keep in mind on this installation: which areas to weigh heavily, which conventions to enforce, what language to write in.- Up to 4,000 characters per installation; the field counts them. Past the cap it says Shorten it to 4000 characters or fewer to save. and Save instructions stays disabled.
- The instructions steer what the review focuses on and how it is phrased. They cannot override Ankra’s own rules or the review format.
- Every repository on the installation follows them. An application that customised its own Pull request review under Application AI settings keeps the instructions set there instead, because customising an activity pins the whole activity.
- A row that reads Ankra cannot keep instructions for this installation yet has no Add instructions button: set the instructions on each application’s settings instead.
- Only a role with the
ai.managepermission, which owners and admins hold, can change them.
What a review posts
One comment per pull request, updated in place on every re-review, never a stream of new ones. Where a pipeline, a preview, or a promotion is also running, they share that comment as separate sections. The review section is laid out like this:
Findings carry a severity of high, medium, or low, and a review keeps to the issues that matter - at most eight. A finding that names a line is also posted as a comment pinned to that line, so it is read where the decision is made. Each inline comment carries an invisible fingerprint of its file and title, so re-reviewing a pull request never restates a finding it has already pinned, even if the line has drifted or the wording changed.
How the review reads a change
- Machine-written files are dropped before the diff is measured. Lockfiles, minified bundles, source maps, and generated protobuf never reach the model. Beyond keeping the cost down, this is what stops a large lockfile from crowding the real change out of the review. Set Ignore paths per repository under Application AI settings to drop more.
- Uncertain findings are settled, not guessed. When a finding rests on something the diff does not show, Ankra reads the file and either restates the finding as a definite defect or drops it. Where that check cannot run, the finding is posted with its uncertainty visible.
- A truncated answer says so. If the model runs out of output budget mid-answer, what arrived is posted under an explicit incomplete-review notice rather than as a finished review that found nothing.
- The diff is treated as text, never as instructions. An instruction planted in a diff or a pull request description asking the reviewer to act, change role, or reveal data is refused.
What the review reads beyond the diff
Before it answers, the review also reads the code a change can break outside its diff: other callers of what changed in the same repository, files in related repositories that still use a name the change removes, and the companion pull request that carries the other half of a cross-repository change. ADepends-on: line in the description declares which pull request has to merge first.
On GitHub, when the diff changes a container build file (Dockerfile, Dockerfile.*, *.dockerfile, Containerfile or Containerfile.*), the review also reads the workflows under .github/workflows that build an image, at the reviewed commit. It compares what they copy into the image and the environment variables they set with the changed file, and searches the code for the items the changed file no longer provides. The comparison is textual, so an item may still arrive another way, such as a volume or a download at startup.
How each of those works, how to relate two repositories, and what an empty result does and does not mean are covered in Cross-repository review.
Talking to the review
Mention@ankraai in a pull request or merge request comment and Ankra AI answers in the thread, with the change as context. This needs Replies to mentions on for that repository.
- Ask a question. “@ankraai does this handle the empty case?” gets an answer grounded in the diff, and a plain statement when the diff does not contain the answer.
- Ask under an inline comment and the question is read as being about that line.
- Ask for a review. A mention is a direct request from a human, so it is never filtered by draft state, branch scope, either review budget, or the documentation-only and dependency-bot skips. It runs even on a draft and even past the Automatic reviews per pull request cap, and it is counted against both budgets.
Only
@ankraai summons the review. It is matched as a whole word, so @ankraai-bot and an address like [email protected] are ignored.When a review does not run
A skipped review is normal and costs nothing. Ankra decides before any model call, in the order below, and stops at the first reason that applies. On GitHub the reason is written to the Ankra AI review check run on that commit: its title reads Review skipped followed by the reason, and its summary says what lifts it. The check run is the one place the decision is recorded.
A skipped head is not retried. Nothing on Ankra’s side re-queues a commit it declined; the next push is a new head, judged afresh against the same switches and counts. So once a pull request is over its budget, every later push to it is skipped until the budget changes.
The two budgets
Two counters can decline a review, and they are set in different places.
The default of 3 applies wherever no rule has saved a cap. A repository rule keeps the cap it was saved with, so a rule added before 13 November 2026 that took the default then, 5, still allows 5 automatic reviews per pull request until someone changes its Automatic reviews per pull request.
The daily budget is checked first, so a repository over both reads daily review budget reached on its check run. Both counters include reviews somebody asked for with
@ankraai: a requested review runs past either budget, and it is still counted against both.
A completed review of a commit replaces any earlier Review skipped on that commit’s check run, so a review requested with @ankraai clears a check that a budget had concluded.
Read what the reviews found
Ankra AI → Code reviews (/next/ai/code-reviews) shows what Ankra AI said on every pull request it reviewed, and what the authors did about it. Review settings, at the top, opens Gateway connections.
- Narrow the view with the Repository list (Every repository by default), the period (Last 7 days, Last 30 days, Last 90 days or All time; Last 30 days by default) and the verdict chips (Every verdict, Approved, Commented, Changes requested). The address keeps the view, so you can share it.
- Read the Summary: Pull requests reviewed, Findings raised, Acted on (the share of judged findings whose code changed) and Repositories covered. With more than one repository in view, By repository lists each one; press a repository to narrow the page to it.
- In Reviews, newest first, each row shows the Pull request, its Verdict, its Findings and when it was Reviewed. Press Show more reviews for older ones. Open a row to read that review.
Ankra judges findings on GitHub pull requests only. A finding on GitLab or Bitbucket Cloud stays Not judged yet after its pull request merges or closes, and never counts toward Acted on.
When nothing was reviewed over All time, the page reads Ankra AI has not reviewed a pull request yet and offers Turn on AI review, which opens Gateway connections.
Per-application overrides
The repository table on Gateway connections sets your organisation’s defaults. An application connected to a repository can override them under Applications → <your application> → Settings → Who runs it, in On your pull requests, which also sets target branches, ignore paths, the daily budget and the input-character budget. Both surfaces read the same stored settings, so they never disagree. See Application AI settings.Cost
A review is a model completion, billed to your organisation like any other AI usage. Four things keep it bounded, and all four are yours to set:- Every lane is off until you turn it on, per connection or per repository.
- Automatic reviews per pull request caps the reviews one pull request can accumulate.
- Review model picks what a review costs. With nothing picked, the organisation’s AI code review model applies.
- Ignore paths and Maximum input characters, under Application AI settings, bound how much of a diff one review reads.
Permissions
Connecting a provider, changing any switch or AI mode, and editing the review instructions need theai.manage permission, which owners and admins hold. Connecting, regenerating or disconnecting GitLab needs a role that may write or delete credentials. Members see the connections and their current settings with the controls disabled.
Troubleshooting
Related
- AI Connections - every integration Ankra AI communicates through
- Cross-repository review - what the review reads outside the diff, related repositories, and merge order
- Application AI settings - per-repository activities, branch scope, ignore paths, and budgets
- PR preview environments - what the Pull request previews switch deploys
- GitHub, GitLab, Bitbucket Cloud - connecting each provider
- AI Skills - the conventions the org skills review checks a change against
ankra application pull-request-reviews- read posted reviews from the CLI