Turn SonarQube quality gate failures from blockers into background work. This automation listens for quality-gate-failed events on pull requests, pulls the issue breakdown from SonarQube, fixes the reported code smells and bugs, and pushes a commit to the same branch — so the gate goes green without developer intervention.Documentation Index
Fetch the complete documentation index at: https://docs.devin.ai/llms.txt
Use this file to discover all available pages before exploring further.
Use this template
Open SonarQube Quality Gate Fix in Devin and create the automation with the default configuration. You can customize it before saving.
What this automation does
SonarQube is great at finding issues; acting on them is the slow part. The SonarQube MCP gives Devin full access to the issue report, so it can work through each finding in order — fixing genuine bugs, refactoring code smells, and removing duplicate code — then re-running the scan to confirm the gate is green.How it works
Trigger: Github event —check.run
- Event:
github:check_run- Conditions:
actioneqcompletedcheck_run.conclusioneqfailurecheck_run.namecontainssonarrepository.full_nameeqyour-org/your-repo
- Conditions:
Prerequisites
- Integrations:
- MCP servers:
- SonarQube MCP — connects Devin to SonarQube
Example prompt
The template ships with this prompt. You can edit it after clicking Use template, or leave it as-is.Setting it up
- Open Automations → Templates in Devin.
- Click SonarQube Quality Gate Fix. The create page opens with this template pre-filled.
- Connect any required integrations and install MCP servers if you haven’t already.
- Replace any placeholder values in the trigger conditions (for example, swap
your-org/your-repofor your actual repo). - Review the prompt and adjust it for your team’s language, conventions, and guardrails.
- Click Create automation.
When to use this template
- Enterprises with mandatory SonarQube quality gates in CI
- Legacy codebases with high debt that need incremental cleanup
- Teams that want quality discipline without the friction
- Onboarding new repos onto stricter quality gates gradually
Customization ideas
- Scope to specific projects, profiles, or rule sets
- Tune which rule categories trigger the automation
- Combine with Code Pattern Enforcer for custom team-specific patterns
- Chain with CI Failure Fixer for full CI coverage
