Skip to main content

Overview

Auto-approve lets Gitar submit an approving review on your behalf after a clean code review. You define criteria in natural language, and if they are met, Gitar approves the PR without any manual action required.

Criteria-Driven

Define approval conditions in natural language, or use the default behavior with no criteria at all

Post-Review Only

Only runs after a clean code review with no blocking findings

Per-Repo Control

Extend org criteria per repository with a config file

How It Works

1

Code review completes

Gitar reviews the PR as usual. If there are blocking findings (severity: Important or above), auto-approve is skipped.
2

Criteria are checked

Gitar evaluates your configured criteria against the PR metadata, changed files, and review results. If no criteria are configured, Gitar approves the PR when the review found no blocking issues.
3

Approval is submitted

Gitar submits an approval on the connected code host. The dashboard comment shows the approval and the rationale.

Enabling Auto-Approve

Auto-approve is configured in your organization settings:
  1. Navigate to Settings -> Configuration in the Gitar dashboard
  2. Open the Behavior section
  3. Enable the Auto-approve PRs based on code review toggle
  4. Optionally, enter custom approval criteria in the text area that appears
Criteria are written in natural language. Examples:
  • “Only approve if the changes are limited to documentation or test files”
  • “Approve changes to the docs/ directory or files ending in .md”
  • “Skip approval if the PR modifies authentication or payment logic”
Auto-approval criteria are evaluated against the PR metadata, changed files, and code review results, not CI pipeline status. Gitar does not verify conditions like “tests pass” or “linting is green”. Enforce those with your platform’s branch protection or merge checks.Criteria also cannot call integration tools. Naming a Jira, Slack, or custom MCP tool in your criteria does not make its result an approval condition, and results from earlier integration calls are not passed into the evaluation.

Use PR risk in criteria

Approval criteria can use Gitar’s whole-PR risk assessment, for example, “Approve only low- or medium-risk changes.” Risk Triage explains the levels and team-defined policy. Risk restricts approval after review. Low risk does not bypass blocking findings, and an unavailable assessment does not meet a risk-dependent condition unless the criteria explicitly allow it.

Default Behavior (No Criteria)

With the toggle enabled and no criteria configured anywhere, neither in the dashboard nor in a repository’s .gitar/config/approve.md, Gitar approves the PR as long as the review surfaced no blocking findings. Non-blocking findings, such as minor suggestions, do not need to be resolved for approval.

After Approval

When auto-approve fires, you can optionally chain additional actions from the same settings section.

gitar-approved Label

Enable Apply gitar-approved label to mark approved PRs. See gitar-approved for label behavior.

Auto-Merge

Enable Auto-merge PRs to merge automatically after approval. See Auto-Merge for platform prerequisites and merge methods.

Per-Repo Criteria

You can define criteria at the repository level by placing a Markdown file at .gitar/config/approve.md. Repo criteria work on their own or alongside org-level criteria. See Repository Customization for more on the .gitar directory and how repo-level config files work.

Combination Logic

Platform Behavior

Auto-approve works on every supported host. See Platform Support for how the rest of the review features compare.
Gitar submits an approving review on the PR. If your branch protection rules require an approving review, this satisfies that requirement.The review body reads: “Gitar has auto-approved this PR” with a link to your auto-approve settings.If auto-merge is also enabled, the review body mentions that auto-merge has been armed.
Gitar approves the MR via the API. If your approval rules list Gitar as an eligible approver, this counts toward the required approval count.If auto-merge is also enabled, Gitar calls the GitLab API to arm auto-merge after approval.
Gitar sets an Approved vote on the PR using the connected service account. If auto-merge is enabled, Gitar also enables auto-complete.
Gitar approves the PR on Cloud and Data Center. Bitbucket Cloud has no auto-merge to arm. On Data Center, Gitar merges the PR itself once Bitbucket’s merge checks pass.

Revocation

If a new push introduces blocking findings, Gitar revokes its previous approval:
  • On GitHub, Gitar dismisses its approving review.
  • On GitLab, Gitar calls the unapprove API.
  • On Azure DevOps, Gitar clears its approval vote.
  • On Bitbucket, Gitar removes its approval.
  • If auto-merge was armed, it is also disabled.
If the gitar-approved label was applied, Gitar removes it when the approval is revoked.
If Gitar cannot complete approval evaluation, it skips approval for that run.