Platform support
Fix CI failures is available on GitHub, GitLab Cloud, and Azure DevOps.GitHub
GitHub Cloud and GitHub Enterprise Server (self-hosted).
GitLab Cloud
Use merge request comment commands to create a stacked merge request or commit fixes directly.
Azure DevOps
Use pull request comment commands to create a stacked pull request or commit fixes directly.
Usage
On GitHub, GitLab Cloud, or Azure DevOps, start Fix CI by commenting on a pull request or merge request that has failing CI checks. Choose where the fixes land:- Stacked pull request:
@coderabbitai fix-ciopens a pull request containing the generated fixes, targeting the current pull request branch. - Direct commit:
@coderabbitai fix-ci commitcommits the generated fixes directly to the pull request branch.
How it works
1
Trigger
Comment
@coderabbitai fix-ci for a stacked pull request or @coderabbitai fix-ci commit for a direct commit. CodeRabbit collects the checks reported as failing on the PR’s head commit. On GitLab Cloud, these are the failed jobs in the merge request’s latest pipeline for that commit.2
Investigate
CodeRabbit clones the repository into a sandbox and gathers context for the failing checks: the available failure output and the relevant CI configuration for the jobs that ran. This tells the agent what failed and how each job is invoked, rather than guessing from the check name alone.
3
Fix
A coding agent works directly in the repository, reading files and editing code to address the failures. It focuses on the code under test: infrastructure and configuration files (CI and build config, lock files, and other dependency manifests) are left out of the change and surfaced separately so you can apply them yourself if they are genuinely needed.
4
Deliver
CodeRabbit either opens a stacked pull request targeting the current branch or commits the fix directly to that branch, based on the command. The status comment lists the failing checks it addressed and the files it changed.
Re-running the fix
Re-running Fix CI behaves like a retry, and where the changes land depends on which pull request you trigger it from:- Stacked pull request: Use
@coderabbitai fix-cion the original pull request to open a separate pull request for the current failures. - Direct commit: Use
@coderabbitai fix-ci committo add the next fix to the current pull request branch. - Retry on a CodeRabbit-created stacked pull request: CodeRabbit commits the next fix directly to that pull request instead of creating an endlessly growing stack.
Scope and limitations
- Delivery options depend on repository access. Direct commit requires permission to write to the pull request branch. Stacked delivery requires permission to create a branch and pull request.
- Target-branch CI filters can affect stacked pull requests. If your CI only runs on pull requests targeting specific branches (for example
main), it may not run on the stacked pull request itself. Merge the stacked pull request into your branch so CI validates on the original pull request. - Infrastructure and dependency files are not committed. Changes the agent makes to CI/build config, lock files, or other dependency manifests are excluded from the delivered changes and listed in the status comment so you can apply them manually.
- GitHub workflow files are excluded. CodeRabbit cannot commit changes under
.github/workflows/. If a fix requires editing a workflow file, it is surfaced in the status comment for you to apply.
Command reference
Investigates failing CI checks and delivers the fixes as a stacked pull request or a commit.- Post in: A pull request comment
- Also accepted:
fix ci,fixci - Requires: write access to the repository;
reviews.finishing_touches.fix_ci.enabledenabled (on by default)
Commit the fixes to the current branch
commitworks with every spelling, for example@coderabbitai fix ci commit.
Configuration
To turn off Fix CI failures, set the following in your.coderabbit.yaml:
Troubleshooting
The fix-ci command isn't available
The fix-ci command isn't available
Check the plan, platform, and setting requirements in the Command reference. On GitLab, Fix CI works on GitLab Cloud only; self-managed GitLab isn’t supported. If the command is turned off for the repository, see Configuration.
The agent only changed configuration files
The agent only changed configuration files
Infrastructure, CI/build config, and dependency files are intentionally left out of direct commits and stacked pull requests. If the only changes the agent produced were out of scope, no fix commit or pull request is created; the status comment lists the files it touched so you can apply them manually.
The stacked PR's CI still fails
The stacked PR's CI still fails
The stacked pull request runs your real CI, which may surface remaining or new failures. Trigger Fix CI on the stacked pull request to have CodeRabbit commit another fix directly to it, or use
@coderabbitai fix-ci on your original pull request to open a fresh stacked pull request. You can also resolve the remaining failures manually.What’s next
Finishing Touches overview
See all available finishing touches and how to trigger them from any PR
Fix comments
Automatically implement fixes for unresolved CodeRabbit review findings
Resolve merge conflicts
Let CodeRabbit analyze the intent behind conflicting changes and commit a clean resolution to your branch