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.
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
Code review completes
Gitar reviews the PR or MR as usual. If there are blocking findings (severity: Important or above), auto-approve is skipped.
Criteria are checked
Gitar evaluates your configured criteria against the PR metadata, changed files, and review results. If no criteria are configured, Gitar will approve the PR if there are no blocking issues found.
Enabling Auto-Approve
Auto-approve is configured in your organization settings:- Navigate to Settings in the Gitar dashboard
- Open the Behavior section
- Enable the Auto-approve PRs/MRs based on code review toggle
- Optionally, enter custom approval criteria in the text area that appears
- “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. Conditions like “tests pass” or “linting is green” are not verified by Gitar and should instead be enforced via your platform’s branch protection or merge
checks.
Default behavior (no criteria)
When the auto-approve toggle is enabled but no criteria are configured — neither in the dashboard nor in a repository’s.gitar/config/approve.md — Gitar will approve the PR if there are no blocking issues found.
After Approval
When auto-approve fires, you can optionally chain additional actions from the same settings section.gitar-approved label
Enable the Apply gitar-approved label toggle to have Gitar add a gitar-approved label to approved PRs. The label is created automatically in your repository if it doesn’t exist. This makes approved changes easy to filter in your platform’s PR list.
Auto-merge
Enable the Auto-merge PRs/MRs after auto-approve toggle to arm your platform’s native auto-merge immediately after approval. On GitHub, you can also choose the merge method (squash, merge commit, or rebase). On GitLab, the project’s default merge method is used. See Auto-Merge for prerequisites and details.Per-Repo Criteria
You can define criteria at the repository level by placing a Markdown file at.gitar/config/approve.md. This works independently or alongside org-level criteria:
- Org criteria only — applies to all repositories in the organization.
- Repo criteria only — applies to that repository even if no org criteria are set.
- Both — Gitar combines them and the PR must satisfy all criteria.
.gitar directory and how repo-level config files work.
Combination Logic
| Org criteria | Repo file | What happens |
|---|---|---|
| Set | Present | Both are combined — PR must satisfy all criteria |
| Set | Absent | Org criteria only |
| Empty | Present | Repo file criteria only |
| Empty | Absent | Default — approve when all code review issues are addressed |
Platform Behavior
GitHub
GitHub
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.
GitLab
GitLab
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.
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.
- If auto-merge was armed, it is also disabled.
gitar-approved label is not removed automatically — you can configure a rule to handle this if needed.
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 (fail-open).