Skip to main content

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

  1. Go to ArchiCore
  2. Click Add ProjectGitHub tab
  3. Click Connect with GitHub
  4. Authorize ArchiCore to access your repositories

Step 2: Select Repository

  1. Search for your repository
  2. Select a branch (usually main or master)
  3. 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:

EventTrigger
pushCode pushed to tracked branch
pull_requestPR opened/updated
analysis_completeAnalysis finished

Permissions Required

ArchiCore needs these GitHub permissions:

PermissionReason
Read codeTo analyze your codebase
Read PRsTo analyze pull requests
Write PR commentsTo post analysis results
WebhooksTo receive push notifications

Disconnecting

To disconnect GitHub:

  1. Go to SettingsConnected Accounts
  2. 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"

  1. Go to GitHub → Repository → Settings → Webhooks
  2. Check ArchiCore webhook status
  3. Look for failed deliveries

"Analysis not running on PR"

  • Ensure "Analyze pull requests" is enabled
  • Check if the base branch is tracked