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. Important or critical findings withhold approval. Approval is also withheld when the configured merge blocking threshold includes unresolved suggestions.
2
Criteria are checked
Gitar evaluates your configured criteria against the whole PR, including its changed files and unresolved findings. 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:- Navigate to Settings -> Configuration in the Gitar dashboard
- Open the Behavior section
- Enable the Auto-approve PRs 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. 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.Require code owner or human approval
On GitHub, criteria can useCODEOWNERS and human reviews. For example:
CODEOWNERS from the PRâs target branch. It checks who owns the changed files and whether each review applies to the current commit. Team ownership requires the GitHub Appâs organization Members: read permission.
If ownership or review evidence cannot be read, the condition is unmet and Gitar withholds approval. These criteria are unavailable on other code hosts, where they also withhold approval.
If the review history is too large to evaluate completely, Gitar withholds criteria-based approval and auto-merge for that run.
Default Behavior (No Criteria)
With the toggle enabled and no criteria in organization settings, configuration repositories, or.gitar/config/approve.md, Gitar approves PRs with no blocking findings. Minor suggestions may remain unless the configured merge blocking threshold includes them.
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.
Gitar reads this file from the default branch. Changes take effect after they merge, so a PR cannot change its own approval policy. If Gitar cannot verify the file, it withholds approval for that run.
See Repository Customization for more on the .gitar directory and how repo-level config files work.
Combination Logic
Organization criteria include shared approval policy from selected configuration repositories. If shared approval policy cannot be verified, Gitar withholds automatic approval for that run.Platform Behavior
Auto-approve works on GitHub, GitLab, Azure DevOps, and both Bitbucket editions. See Platform Support for preview availability.GitHub
GitHub
Gitar submits an approving review on the PR. It can count toward required approvals, subject to the repositoryâs rules. Required code-owner reviews, additional approvals, and status checks still apply.The review body reads: âGitar has auto-approved this PRâ with a link to your auto-approve settings.The approval message alone does not confirm that auto-merge was enabled. Check the dashboard comment for the auto-merge outcome.
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.When auto-merge is enabled and its separate merge criteria are met, Gitar attempts to enable it. Approval can still succeed when auto-merge is held.
Azure DevOps
Azure DevOps
Gitar sets an Approved vote on the PR using the connected service account. When auto-merge is enabled and its separate merge criteria are met, Gitar attempts to enable auto-complete. Approval can still succeed when auto-complete is held.
Bitbucket
Bitbucket
Gitar approves the PR on Cloud and Data Center. Bitbucket Cloud has no auto-merge to arm. On Data Center, when auto-merge is enabled and its separate merge criteria are met, Gitar merges the PR itself once Bitbucketâs merge checks pass. Approval can still succeed when the merge is held.
Revocation
Each new review checks the current PR against the current criteria. On GitHub, resolving finding threads can trigger another approval evaluation without a push once the review is eligible. The dashboard shows Re-evaluating while that check runs. If Gitar integrates other commits while pushing a fix, it requires a fresh review before auto-approving the updated branch. If a later evaluation finds blocking findings or unmet approval criteria, Gitar revokes its previous approval. A clean review alone does not preserve approval when the criteria are no longer met:- 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.
- Gitar also attempts to cancel auto-merge it enabled.
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.