Skip to main content
The CI Failure Fixer automation keeps your pull requests green without human intervention. Every time a CI check fails on a non-Devin PR, Devin opens the failing job, reads the build and test logs, diagnoses the root cause, and pushes a fix to the same branch — then re-runs the suite to verify the check passes.

Use this template

Open CI Failure Fixer in Devin and create the automation with the default configuration. You can customize it before saving.
Looking for a hands-on walkthrough? See the step-by-step tutorial for CI Failure Fixer.

What this automation does

This template wires GitHub’s check_run webhook to a Devin session. Devin has full context of the PR and the failing job URL, so it can pull down the branch, reproduce the failure locally, and iterate on a fix without you ever opening your laptop. The automation includes a built-in guard to skip any commit authored by devin-ai-integration[bot] so you never get into a loop of Devin fixing its own work.

How it works

Trigger: Github eventcheck.run
  • Event: github:check_run
    • Conditions:
      • action eq completed
      • check_run.conclusion eq failure
      • repository.full_name eq your-org/your-repo
What Devin does: Starts a session with full event context, executes the prompt below, and (optionally) notifies you on failure.

Prerequisites

Example prompt

The template ships with this prompt. You can edit it after clicking Use template, or leave it as-is.

Setting it up

  1. Open Automations → Templates in Devin.
  2. Click CI Failure Fixer. The create page opens with this template pre-filled.
  3. Connect any required integrations and install MCP servers if you haven’t already.
  4. Replace any placeholder values in the trigger conditions (for example, swap your-org/your-repo for your actual repo).
  5. Review the prompt and adjust it for your team’s language, conventions, and guardrails.
  6. Click Create automation.
Most automation templates include suggested ACU and invocation limits to bound cost during early rollout. Keep them as-is until you’re confident in the automation’s behavior, then raise them to fit your workload.

When to use this template

  • Flaky tests that block merges overnight or during off-hours
  • Lint, type-check, and format errors you’d rather not fix by hand
  • Missing imports, stale snapshots, and trivial test failures on community PRs
  • Unblocking developers without pulling another engineer away from deep work

Customization ideas

  • Scope the trigger to a single repo or expand it to every repo in an org
  • Add a condition that only fires on specific check names (e.g. only lint, not the full matrix)
  • Raise the ACU cap if your test suite is long-running, or lower it to bound cost
  • Chain with a Slack notification on failure so a human reviewer can step in when Devin gives up

See also