Overview
Gitar automatically fixes code on your pull requests and merge requests — whether the issue comes from a CI failure, a code review finding, or a direct instruction in a comment. Instead of manually debugging build logs or addressing review feedback line by line, you get an immediate analysis and an automated fix, all within your PR/MR interface.Root Cause Analysis
Instant breakdown of why CI failed, posted as a comment on your PR/MR
Automated Fixes
Gitar pushes code changes that resolve failures, review findings, and requested changes
Multi-Iteration
If a fix introduces a new failure, Gitar re-analyzes and attempts another fix automatically
Developer Control
Choose to auto-apply fixes, apply them selectively, or use the analysis as context for your own fix
What Gitar Can Fix
Gitar handles a wide range of issues on your PRs/MRs:- CI failures — Build errors, test failures, linting violations, and flaky tests
- Code review findings — Security vulnerabilities, bugs, performance issues, and code quality problems identified during review
- Requested changes — Instructions given via
Gitar <instruction>comments on your PR/MR - Repository rule actions — Automated changes triggered by your configured repository rules
CI Failure Analysis
When CI fails on a PR/MR, Gitar automatically:Analyze the failure
Gitar reads the CI logs, identifies the failing step, and determines the root cause of the failure.
Post an analysis comment
A detailed explanation of the failure is posted to the dashboard comment on your PR/MR, including which files and lines are involved.
| Failure Type | Examples |
|---|---|
| Build errors | Compilation failures, missing imports, type errors |
| Test failures | Broken assertions, missing setup, incorrect expected values |
| Linting errors | Code style violations, formatting issues, static analysis warnings |
| Flaky tests | Race conditions, timing issues, non-deterministic behavior |
Fixes
Gitar can push fixes to your branch in several ways:- Auto-apply — When enabled, Gitar pushes fixes automatically without waiting for approval. Toggle with
gitar auto-apply:on/gitar auto-apply:off. - Comment instructions — Comment
Gitar <instruction>on your PR/MR to tell Gitar exactly what to fix. For example:Gitar fix the auth test by adding the missing Bearer token. - Code review findings — When auto-apply is enabled, Gitar also fixes issues identified during code review, not just CI failures.
Reviewing and Accepting Fixes
After Gitar posts its analysis, you have three options for how to proceed:| Option | How |
|---|---|
| Let Gitar auto-fix | Check the [ ] Automatically accept suggestions checkbox in the Gitar dashboard comment. Gitar will push a fix commit to your branch. |
| Fix it yourself | Use the root cause analysis as context and push your own fix. Gitar updates its analysis when new commits arrive. |
| Request a targeted fix | Comment Gitar <specific instruction> on the PR/MR to tell Gitar exactly how you want the issue resolved. |
Only users with write access to the repository can trigger Gitar to push fixes. This ensures that unauthorized users cannot modify your code through Gitar.
Controlling Auto-Apply
You can toggle automatic fix application at any time using commands in a PR/MR comment:| Command | Description |
|---|---|
gitar auto-apply:on | Enable automatic fix application. Gitar will push fixes without waiting for approval. |
gitar auto-apply:off | Disable automatic fixes. Gitar will only post analysis and wait for your input. |
Multi-Iteration Fixing
CI failures are not always resolved in a single pass. Gitar supports multi-iteration fixing:- Gitar pushes a fix for the original CI failure.
- CI re-runs on the updated branch.
- If CI fails again (whether from the same issue or a newly introduced one), Gitar re-analyzes the new failure.
- Gitar attempts another fix, taking into account the full history of previous attempts.
If Gitar is unable to resolve a failure after multiple iterations, it will post a summary of what was attempted so you have full context to debug manually.
Example Workflow
Here is an end-to-end example of Gitar fixing a CI failure on a pull request.CI fails on the PR
A test failure is detected after pushing new commits. Gitar begins analyzing the CI logs.
Analysis is posted
Gitar posts a root cause analysis to the dashboard comment, identifying the failing test and the code change that caused it.
User enables auto-apply or comments
The developer either checks the auto-apply checkbox or comments with a specific instruction like
Gitar fix the auth test by adding the missing Bearer token.