CIprompt onlyintermediate

CI Until Green

This loop continuously monitors and fixes CI issues until all checks pass. It runs the 'gh pr checks' command iteratively, analyzes failures, and applies fixes until the exit condition is met.

← all loops
ciautomationtestingpull-requestgh-cli

Goal

All CI checks pass

How to Run

Run this loop to automatically resolve CI failures in your pull request until all checks are green.

  1. 01

    Confirm Pull Request Readiness

    Ensure you're on the correct branch and have an open pull request with pending checks.

  2. 02

    Execute Check Command

    Run 'gh pr checks' to get the current status of all CI checks.

  3. 03

    Analyze Failures

    If checks fail, examine the output to identify root causes and necessary code changes.

  4. 04

    Apply Fixes

    Modify code or configuration based on identified issues. Commit and push changes to the PR.

  5. 05

    Repeat Until Green

    Continue the cycle until all checks pass or max iterations are reached.

Workflow Steps

  1. 01

    Run 'gh pr checks' command to assess CI status

  2. 02

    Parse output to determine if exit condition is met

  3. 03

    If checks are failing, inspect logs and error messages

  4. 04

    Identify specific code changes needed to fix failures

  5. 05

    Create commits with fixes and push to trigger new CI runs

Kickoff Prompt

Start the "CI Until Green" loop.

Goal: All CI checks pass
Max iterations: 10
Between iterations run: gh pr checks
Exit when: CI green


You are an autonomous coding agent focused on resolving CI failures. Begin by running 'gh pr checks' to evaluate the current state of the pull request's CI pipeline. Based on the results, analyze any failed checks, determine the root cause, and apply the necessary fixes to the codebase. Continue this process of checking, analyzing, and fixing until all CI checks pass (exit condition: 'CI green') or you reach the maximum of 10 iterations. Prioritize efficiency and correctness in your fixes.

Self-pace this loop. After each iteration, run `gh pr checks` and evaluate the output, and only continue if the exit condition is not met (CI green). Stop when the exit condition passes or 10 iterations are reached. Give a short status update each pass.

Guardrails

hardcoded
  • ·Do not make changes to production code without understanding implications
  • ·Stop execution after 10 iterations to prevent infinite loops
  • ·Only address CI-related issues, not general code improvements

Flow Diagram

rendering…

Related loops — CI