Skip to main content

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

Gitar monitors your CI pipelines and automatically analyzes failures on every PR. It identifies root causes, posts detailed breakdowns, and can push fixes.

Root Cause Analysis

Instant breakdown of why CI failed, posted as a comment on your PR

Automated Fixes

Gitar pushes code changes that resolve CI failures

Multi-Iteration

If a fix introduces a new failure, Gitar re-analyzes and attempts another fix automatically

CI Retry

Automatically retry CI jobs with failures unrelated to your PR

CI Failure Analysis

When CI fails on a PR, Gitar automatically:
1

Analyze the failure

Gitar reads the CI logs, identifies the failing step, and determines the root cause of the failure.
2

Post an analysis comment

A detailed explanation of the failure is posted to the dashboard comment on your PR, including which files and lines are involved.
3

Suggest or apply a fix

Depending on your auto-apply setting, Gitar either waits for your approval or pushes a fix commit directly to the branch.
The analysis appears in the Gitar dashboard comment on your PR. The analysis covers your full CI pipeline output, so Gitar can diagnose failures across multiple jobs and steps in a single run. Identical failures across multiple jobs are deduplicated so they only get analyzed once. CI events for outdated commits are ignored after you push new code.
Failure TypeExamples
Build errorsCompilation failures, missing imports, type errors
Test failuresBroken assertions, missing setup, incorrect expected values
Linting errorsCode style violations, formatting issues, static analysis warnings
Flaky testsRace conditions, timing issues, non-deterministic behavior

Applying Fixes

After Gitar posts its analysis, you have three options:
OptionHow
Let Gitar auto-fixEnable auto-apply on the PR with gitar auto-apply:on. Gitar pushes a fix commit to your branch.
Fix it yourselfUse the root cause analysis as context and push your own fix. Gitar updates its analysis when new commits arrive.
Request a targeted fixComment Gitar <specific instruction> on the PR to tell Gitar exactly how you want the issue resolved.
Auto-apply can be toggled at any time with gitar auto-apply:on / gitar auto-apply:off. See Commands & Interactions for all available commands.

CI Retry for Unrelated Failures

Gitar can automatically retry CI jobs whose failures are not related to the changes in your PR — for example, flaky tests, transient infrastructure hiccups, or failures caused by the target branch. When any failure in a pipeline is classified as unrelated to the PR, those jobs are rerun without any manual action. CI retry has its own toggle in organization settings, independent from auto-apply.

Multi-Iteration Fixing

CI failures may not be resolved in a single pass. Gitar supports multi-iteration fixing:
  1. Gitar pushes a fix for the original CI failure.
  2. CI re-runs on the updated branch.
  3. If CI fails again (whether from the same issue or a newly introduced one), Gitar re-analyzes the new failure.
  4. Gitar attempts another fix, taking into account the full history of previous attempts.
This loop continues automatically until CI passes or Gitar determines it cannot make further progress. Each iteration builds on the context of previous attempts, so Gitar avoids repeating the same fix.