AI Workflow Failure Summary Action¶
Overview¶
AI Workflow Failure Summary Action is a powerful GitHub Action that automatically analyzes failed workflow runs using advanced AI models. It transforms cryptic error logs into clear, actionable summaries that help developers quickly understand and resolve issues.
graph LR
A[Workflow Fails] --> B[Action Triggered]
B --> C[Fetch Logs]
C --> D[AI Analysis]
D --> E[Generate Summary]
E --> F[Create Issue]
E --> G[Display in Actions]
F --> H[Notify Team]
G --> I[Debug & Fix]
Key Features¶
🤖 AI-Powered Analysis¶
Uses state-of-the-art LLM models to understand failure context and provide intelligent insights beyond simple log parsing.
🔌 Multiple LLM Providers¶
Choose from OpenAI, Azure OpenAI, GitHub Models, or Anthropic Claude - whatever fits your needs and budget.
📊 Actionable Insights¶
Get structured summaries with: - Root cause identification - Specific error details and locations - Step-by-step fix recommendations - Related context and dependencies
🎯 Seamless GitHub Integration¶
- Automatic issue creation with formatted analysis
- Integration with GitHub Actions summary
- Works with GitHub Copilot for enhanced assistance
🔍 Copilot Ready¶
Output is optimized for GitHub Copilot, making it easy to: - Get AI-powered fix suggestions - Understand complex error patterns - Navigate to problematic code sections
⚙️ Highly Customizable¶
- Custom prompt templates via
.github/prompts/ - Configurable log line limits
- Flexible issue creation options
- Multiple output formats
Why Use This Action?¶
Before:
Error: Command failed with exit code 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
[147 more lines of logs...]
After:
## Summary
Your test suite failed due to a missing environment variable.
## Root Cause
The `DATABASE_URL` environment variable is not set in the workflow,
causing the database connection to fail during integration tests.
## Recommended Actions
1. Add DATABASE_URL to your workflow environment
2. Or add it to repository secrets
3. Ensure the test database is accessible from Actions runners
## Error Location
- File: test/integration/db.test.js:15
- Error: `DATABASE_URL is not defined`
How It Works¶
sequenceDiagram
participant W as Workflow
participant A as AI Action
participant GH as GitHub API
participant LLM as LLM Provider
participant I as Issues
W->>W: Workflow Fails
W->>A: Trigger Analysis
A->>GH: Fetch Failed Job Logs
GH-->>A: Return Logs
A->>A: Process & Format Logs
A->>LLM: Send for Analysis
LLM-->>A: Return AI Summary
A->>GH: Post to Actions Summary
A->>I: Create Issue (optional)
I-->>W: Link Issue to Run
Quick Example¶
name: CI with AI Analysis
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm test
analyze-failure:
if: failure()
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: ianlintner/ai_summary_action@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
llm-provider: 'openai'
openai-api-key: ${{ secrets.OPENAI_API_KEY }}
create-issue: 'true'
What's Next?¶
-
Get up and running in 5 minutes with a drop-in workflow
-
Learn about all available options and customization
-
Tailor AI analysis to your specific needs and tech stack
-
Supercharge debugging with Copilot assistance
Community & Support¶
License¶
This project is licensed under the MIT License - see the LICENSE file for details.