|
| 1 | +--- |
| 2 | +title: "CircleCI Integration" |
| 3 | +sidebarTitle: "CircleCI" |
| 4 | +icon: "circle-play" |
| 5 | +--- |
| 6 | + |
| 7 | +Monitor and automatically fix failing CI checks with CircleCI integration. Codegen views check status, analyzes build logs, and automatically fixes issues when PRs fail. When Codegen creates a PR and checks fail, it will automatically wake up to investigate the logs and push fixes. |
| 8 | + |
| 9 | +<Warning> |
| 10 | + CircleCI is currently available for enterprise customers. See |
| 11 | + [codegen.com/billing](https://codegen.com/billing) for more |
| 12 | +</Warning> |
| 13 | + |
| 14 | +## Capabilities |
| 15 | + |
| 16 | +The CircleCI integration enables intelligent check monitoring and automatic issue resolution: |
| 17 | + |
| 18 | +- **View broken checks and failures** - Monitor CI check status and identify specific failure points |
| 19 | +- **Analyze build logs and error messages** - Grep through logs to understand root causes of failures |
| 20 | +- **Automatically fix failing PRs** - Push corrective changes when checks fail on Codegen-created PRs |
| 21 | +- **Wake up on check failures** - Automatically trigger when CI checks fail to investigate and resolve issues |
| 22 | + |
| 23 | +## Permissions |
| 24 | + |
| 25 | +The Codegen CircleCI integration requires the following permissions: |
| 26 | + |
| 27 | +- **Read project information and settings** - Access pipeline configurations and project details |
| 28 | +- **View build history and logs** - Monitor pipeline execution and analyze failure logs |
| 29 | +- **Read test results and artifacts** - Access build outputs, test reports, and error details |
| 30 | +- **Access check status and details** - Monitor CI check results and failure information |
| 31 | + |
| 32 | +<Note> |
| 33 | + Codegen operates in read-only mode for CircleCI - it monitors and analyzes but |
| 34 | + does not trigger builds or modify CI configurations. |
| 35 | +</Note> |
| 36 | + |
| 37 | +## How Agents Use CircleCI |
| 38 | + |
| 39 | +Agents leverage the CircleCI integration to: |
| 40 | + |
| 41 | +- **Monitor Check Status:** Continuously watch for CI check failures on pull requests |
| 42 | +- **Analyze Failure Logs:** Grep through build logs to identify specific errors, test failures, or build issues |
| 43 | +- **Auto-Fix Issues:** When Codegen creates a PR and checks fail, it automatically investigates and pushes fixes |
| 44 | +- **Prevent Broken Merges:** Ensure code quality by resolving CI failures before merge |
| 45 | + |
| 46 | +## Automatic Wake-Up Behavior |
| 47 | + |
| 48 | +When Codegen creates a pull request and CircleCI checks fail, Codegen will automatically: |
| 49 | + |
| 50 | +1. **Detect the failure** - Monitor check status and identify when builds break |
| 51 | +2. **Analyze the logs** - Grep through CircleCI logs to understand the specific failure |
| 52 | +3. **Generate fixes** - Create targeted code changes to resolve the identified issues |
| 53 | +4. **Push updates** - Automatically commit fixes to the same PR branch |
| 54 | + |
| 55 | +This ensures that Codegen-created PRs maintain high quality and don't introduce breaking changes to your codebase. |
| 56 | + |
| 57 | +## Installation |
| 58 | + |
| 59 | +Connect your CircleCI account to Codegen to enable automatic check monitoring and issue resolution. |
| 60 | + |
| 61 | +<Card |
| 62 | + title="Connect CircleCI Account" |
| 63 | + icon="circle-play" |
| 64 | + href="https://codegen.sh/integrations" |
| 65 | +> |
| 66 | + Authorize Codegen to view your CircleCI check results and build logs. |
| 67 | +</Card> |
| 68 | + |
| 69 | +<Note> |
| 70 | + Ensure the agent has access to the specific CircleCI projects and |
| 71 | + organizations you want it to monitor. |
| 72 | +</Note>{" "} |
0 commit comments