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

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 or MR as usual. If there are blocking findings, auto-approve is skipped.
2

Criteria are checked

Gitar evaluates your configured criteria against the PR. If they are satisfied, it moves on to approval.
3

Approval is submitted

Gitar submits an approving review on GitHub or GitLab. The dashboard comment is updated to reflect the approval.

Enabling Auto-Approve

Auto-approve is configured in your organization settings:
  1. Navigate to Settings in the Gitar dashboard
  2. Open the Code Review section
  3. Enable the Auto-approve PRs/MRs based on code review toggle
  4. Enter your 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”
If no criteria are provided, Gitar approves all PRs that pass code review.

Per-Repo Criteria

Repositories can extend the org-level criteria by placing a Markdown file at .gitar/config/approve.md. When this file is present and non-empty, its content is combined with the org criteria. Both must be satisfied for Gitar to approve. See Repository Configuration for more on the .gitar directory and how repo-level config files work.
mkdir -p .gitar/config
echo "Only approve if no database migrations are included." > .gitar/config/approve.md

# You can also symlink an existing file
ln -s ../../.gitlab/auto-approval-rules.md .gitar/config/approve.md

Combination Logic

Org criteriaRepo fileWhat Gitar uses
SetPresentOrg criteria + repo file
SetAbsentOrg criteria only
EmptyPresentRepo file only
EmptyAbsentApprove all passing reviews

Platform Behavior

Gitar submits an approving review on the PR. If your branch protection rules require an approving review, this satisfies that requirement.
Gitar approves the MR. If your approval rules list Gitar as an eligible approver, this counts toward the required approval count.
Auto-approve only ever submits approvals and never requests changes. If anything goes wrong during evaluation, the step is skipped and the PR is unaffected.