Overview
Auto-apply lets Gitar commit fixes for review findings and CI failures to a PR’s branch. Organization and repository criteria limit which review findings Gitar may fix. Auto-apply is off by default. Turn it on for a PR withgitar auto-apply:on. On GitHub and GitLab, you can also use the gitar-managed label. Saving criteria does not turn auto-apply on for any PR.
Turn automatic fixes off with gitar auto-apply:off. Explicit fix requests such as gitar fix remain available. See Labels for command precedence and label removal behavior.
Set Organization Criteria
Write criteria in Settings -> Configuration to limit automatic review fixes across the organization.- Open Settings -> Configuration in the Gitar dashboard.
- Find the Auto-apply review criteria card.
- Enter criteria under Organization review criteria.
- Select Save.
- “Only fix unused imports and formatting. Skip payment logic.”
- “Only fix minor findings on low-risk PRs.”
- “Skip findings in authentication or authorization code.”
The fixer cannot run shell commands or tests, so criteria that require passing tests are never met. An unavailable risk assessment does not meet a risk-dependent condition.
Per-Repo Criteria
Add.gitar/config/apply.md to extend organization criteria for one repository. When both are present, a fix must satisfy both. Without the file, organization criteria apply on their own.
Gitar reads the file from the default branch, so changes inside a PR cannot authorize that PR’s own fixes. See Repository Customization for the .gitar directory.
The .gitar/config/apply.md file is specific to each repository. It is not inherited from configuration repositories. If Gitar cannot verify the repository’s default-branch criteria, it skips automatic review fixes for that run.
What Criteria Control
Criteria select fixes for code review findings only. CI fixes, CI recovery, rule actions, and explicit requests such asgitar fix work independently of these criteria. Auto-approve and auto-merge have separate criteria.
Each run considers up to eight findings for automatic fixes. Findings beyond the first eight are left unchanged. Gitar checks each proposed patch against the criteria before committing and checks the combined changes again before pushing. A rejected candidate patch is dropped without losing earlier accepted fixes, and its finding stays open.
Findings from an older commit need a fresh review before Gitar can fix them automatically. If Gitar cannot evaluate a fix against the criteria, it leaves the finding unchanged and records a skip reason.
Results in the Dashboard Comment
When criteria are set and findings have been evaluated, Options in the dashboard comment shows a count such asAuto-apply: 1 / 3 findings fixed, with reasons for skipped findings. The count includes only fixes pushed to the branch.