GitHub Integration
Connect your GitHub repositories for automatic analysis.
Features
- Automatic indexing on push to main branch
- Pull request analysis with architecture feedback
- Webhook notifications for analysis results
Setup
Step 1: Connect GitHub
- Go to ArchiCore
- Click Add Project → GitHub tab
- Click Connect with GitHub
- Authorize ArchiCore to access your repositories
Step 2: Select Repository
- Search for your repository
- Select a branch (usually
mainormaster) - Enable options:
- Auto-analyze on push - Index on every push
- Analyze pull requests - Comment on PRs
Step 3: Configure (Optional)
Create .archicore/config.json in your repository:
{
"github": {
"autoIndex": true,
"analyzePRs": true,
"branches": ["main", "develop"]
}
}
Pull Request Analysis
When enabled, ArchiCore comments on PRs with:
- Architecture impact - Files affected by changes
- Complexity changes - If complexity increased
- Security alerts - New vulnerabilities introduced
- Best practices - Suggestions for improvement
Example PR Comment
## ArchiCore Analysis
### Impact Summary
- **Files changed:** 5
- **Files affected:** 12
- **Risk level:** Medium
### Architecture Changes
- Modified `UserService` which affects 8 dependents
- Added new dependency: `src/utils/validator.ts`
### Recommendations
- Consider adding tests for `validateEmail()` function
- Complexity of `processUser()` increased to 15 (threshold: 10)
Webhook Events
ArchiCore sends webhooks for:
| Event | Trigger |
|---|---|
push | Code pushed to tracked branch |
pull_request | PR opened/updated |
analysis_complete | Analysis finished |
Permissions Required
ArchiCore needs these GitHub permissions:
| Permission | Reason |
|---|---|
| Read code | To analyze your codebase |
| Read PRs | To analyze pull requests |
| Write PR comments | To post analysis results |
| Webhooks | To receive push notifications |
Disconnecting
To disconnect GitHub:
- Go to Settings → Connected Accounts
- Click Disconnect next to GitHub
This removes ArchiCore's access but preserves your projects.
Troubleshooting
"Repository not found"
- Ensure the repository is not private, or
- Re-authorize ArchiCore with access to private repos
"Webhook not firing"
- Go to GitHub → Repository → Settings → Webhooks
- Check ArchiCore webhook status
- Look for failed deliveries
"Analysis not running on PR"
- Ensure "Analyze pull requests" is enabled
- Check if the base branch is tracked