Stop wasting time debugging CI failures. Get AI-powered root cause analysis in seconds.
- uses: sensethelog/action@v1
if: failure()
with:
sensethelog-api-key: ${{ secrets.SENSETHELOG_API_KEY }}| Before | After |
|---|---|
| Scroll through 1000s of log lines | Instant root cause identification |
| Google the error message | AI-suggested fix with code example |
| Same error keeps happening | Pattern detection alerts you |
| 30+ minutes debugging | Under 30 seconds |
Free tier: 100 analyses/month. No credit card required.
Sign up at sensethelog.com and create an API key in Settings.
Go to your GitHub repository:
Settings → Secrets and variables → Actions → New repository secret
- Name:
SENSETHELOG_API_KEY - Value: Your API key from SenseTheLog
name: CI Pipeline
on: [push, pull_request]
permissions:
actions: read
contents: read
pull-requests: write # Required for PR comments
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm install
- run: npm test
# Add this job - runs only when build fails
analyze:
runs-on: ubuntu-latest
needs: [build]
if: failure()
steps:
- name: Analyze with SenseTheLog
uses: sensethelog/action@v1
with:
sensethelog-api-key: ${{ secrets.SENSETHELOG_API_KEY }}That's it! When your CI fails, you'll see:
- Root cause analysis in the GitHub Actions summary
- Suggested fix with code examples
- Automatic PR comment with the analysis
- Link to view history and patterns in your dashboard
| Feature | Description |
|---|---|
| AI Root Cause Analysis | Instantly understand why your CI failed |
| Suggested Fixes | Get working code examples to fix the issue |
| PR Comments | Auto-post analysis as PR comment |
| Pattern Detection | Know when the same error keeps happening |
| Multi-Job Support | Analyzes all failed jobs in one run |
| GitHub Summary | See results directly in Actions tab |
| Dashboard | Track trends and insights across all repos |
Works with any CI failure, including:
- JavaScript/Node.js - TypeError, Module not found, npm/yarn errors
- Python - ImportError, SyntaxError, pip errors
- Build Tools - Webpack, TypeScript, ESBuild, Vite
- Test Frameworks - Jest, pytest, Mocha, Cypress
- Linters - ESLint, Prettier, Pylint
- Infrastructure - Terraform, CloudFormation, Docker, Kubernetes
- Databases - Connection errors, migration failures
| Input | Description | Required | Default |
|---|---|---|---|
sensethelog-api-key |
Your SenseTheLog API key | Yes | - |
comment-on-pr |
Post analysis as PR comment | No | true |
workflow-run-id |
Workflow run ID to analyze | No | Current run |
github-token |
Token for fetching logs | No | github.token |
| Output | Description |
|---|---|
failure-id |
Unique ID of the recorded failure |
signature |
Error signature for pattern matching |
is-recurring |
true if this error has occurred before |
root-cause |
AI-generated root cause analysis |
suggested-fix |
AI-suggested fix with code example |
comment-url |
URL of the PR comment |
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm test
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm run build
deploy:
runs-on: ubuntu-latest
needs: [test, build]
steps:
- run: ./deploy.sh
# Analyze ALL failures in one place
analyze:
runs-on: ubuntu-latest
needs: [test, build, deploy]
if: failure()
steps:
- uses: sensethelog/action@v1
with:
sensethelog-api-key: ${{ secrets.SENSETHELOG_API_KEY }}PR comments are enabled by default. When CI fails on a PR, SenseTheLog automatically posts an analysis comment:
- uses: sensethelog/action@v1
if: failure()
with:
sensethelog-api-key: ${{ secrets.SENSETHELOG_API_KEY }}
# comment-on-pr: true (default)Example PR Comment:
- build →
npm testThe test is trying to access
data.emailbutdatais undefined. ThevalidateInputfunction doesn't handle null/undefined input.const validateInput = (data) => { if (!data?.email) return false; return data.email.includes('@'); };This error has occurred 3 times before. Consider prioritizing a permanent fix.
Features:
- Updates existing comment (no spam)
- Works with
pull_requestandworkflow_runevents - Detects PR from commit SHA automatically
To disable PR comments:
- uses: sensethelog/action@v1
if: failure()
with:
sensethelog-api-key: ${{ secrets.SENSETHELOG_API_KEY }}
comment-on-pr: falseAdd these permissions to your workflow:
permissions:
actions: read # Required to fetch workflow logs
contents: read # Required to access repository
pull-requests: write # Required for PR comments| Plan | Analyses/Month | Price |
|---|---|---|
| Free | 100 | $0 |
| Pro | 10,000 | $10/mo |
| Team | 100,000 | $29/mo |
- Website: sensethelog.com
- Documentation: sensethelog.com/#docs
- Issues: GitHub Issues
- Email: support@sensethelog.com
MIT