Overview
The GitHub integration enables IncidentFox to:- Analyze CI/CD failures automatically
- Investigate code-related issues
- Correlate deployments with incidents
- Propose fixes for failing tests
Prerequisites
- GitHub repository admin access
- IncidentFox account with GitHub integration enabled
- GitHub Personal Access Token (PAT)
Setup
Step 1: Generate GitHub Token
- Go to GitHub Settings > Developer settings > Personal access tokens
- Click Generate new token (classic)
- Select scopes:
repo- Full repository accesswrite:discussion- Post commentsworkflow- Access GitHub Actions
- Copy the generated token
Step 2: Configure Webhook
- Go to your repository Settings > Webhooks
- Click Add webhook
- Configure:
- Payload URL:
https://api.incidentfox.ai/api/github/webhook - Content type:
application/json - Secret: Generate a random string
- Payload URL:
- Select events:
- Issue comments
- Pull request review comments
- Check runs (for CI/CD monitoring)
- Save
Step 3: Add to IncidentFox
Via Web UI:- Go to Team Console > Integrations
- Click Add Integration > GitHub
- Enter:
- Personal Access Token
- Webhook Secret
- Default Organization
- Default Repository
- Click Test Connection
- Save
Usage
Trigger Investigation from PR
Comment on a Pull Request:Trigger from Issue
Comment on an Issue:Auto-Fix CI Failures
When a PR has failing checks:- Analyze the CI logs
- Identify the root cause
- Propose a fix
- Wait for approval before committing
CI/CD Monitoring
Automatic Investigation
Configure IncidentFox to automatically investigate CI failures:Supported CI Systems
| System | Status | Capabilities |
|---|---|---|
| GitHub Actions | Full | Logs, status, artifacts |
| AWS CodePipeline | Full | Pipeline status, logs |
| Jenkins | Basic | Build status via webhooks |
| CircleCI | Basic | Status via webhooks |
Auto-Fix Workflow
When IncidentFox identifies a fix:1
Detection
CI failure detected via webhook
2
Analysis
Agent analyzes logs and code changes
3
Root Cause
Identifies the specific breaking change
4
Proposal
Posts proposed fix as a comment
5
Approval
Waits for user to type
fix to approve6
Commit
Pushes fix commit to the PR branch
Example Fix Flow
User comment:Tools Available
search_github_code
Search code across repositories.
read_github_file
Read specific file contents.
create_pull_request
Create PRs (with approval).
list_pull_requests
List PRs in a repository.
get_github_actions_logs
Fetch CI/CD logs.
Best Practices
- Use specific repos - Don’t enable for all repos initially
- Review fixes before applying - Always verify proposed changes
- Set up notifications - Route CI failures to appropriate channels
- Use branch protection - Require review before merging auto-fixes
Security Considerations
- Use fine-grained PATs when possible
- Store tokens in secrets manager
- Limit repository access scope
- Enable audit logging for all actions
- Require approval for write operations
Troubleshooting
Webhook Not Receiving
- Check webhook URL is correct
- Verify secret matches configuration
- Check GitHub webhook delivery logs
- Ensure network allows outbound to IncidentFox
Bot Not Commenting
- Verify PAT has
reposcope - Check bot has write access to repo
- Review webhook events enabled

