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. Turn auto-apply on for a PR withgitar auto-apply:on or the gitar-managed label. Saving criteria does not turn auto-apply on for any PR.
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.
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 fixes up to eight findings. Gitar checks every patch against the criteria before committing and again before pushing. A rejected patch is dropped without losing earlier accepted fixes, and its finding stays open.
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.