name: Failed Run Autofix
model: openai/gpt-4.1
tools: # Add this to define available tools (adjust based on your MCP/GitHub setup)
- type: function
function:
name: actions/get_workflow_run_logs
description: Retrieve logs from a failed GitHub Actions workflow run.
parameters:
type: object
properties:
repo: { type: string, description: "Repository name" }
owner: { type: string, description: "Repository owner" }
workflow_run_id: { type: string, description: "Workflow run ID" }
required: ["repo", "owner", "workflow_run_id"]
messages:
- role: system
content: >
You are an expert DevOps engineer specializing in CI/CD failure analysis.
First, use the provided tools to retrieve workflow logs. Then, analyze the logs for root causes, transience, and remediation plans.
Output a tool call if needed, or the final JSON analysis after retrieving data.
- role: user
content: >
## CI/CD Pipeline Failure Logs
Retrieve logs using the actions/get_workflow_run_logs tool with:
- Repo: {{repo}}
- Owner: {{owner}}
- Workflow Run ID: {{workflow_run_id}}
After retrieving the logs, analyze the failure and provide a comprehensive assessment in JSON format, including whether it's transient, root cause, category, and remediation plan.