Skip to content

GitHub Integration

The GitHub integration enables automatic repository discovery, manifest reading, README fetching, topic-based ownership, and optional Forge workflow automation.

Shoehorn connects to GitHub with GitHub Apps:

  1. Shoehorn App - Required for discovery, manifests, READMEs, topics, and webhooks
  2. Shoehorn Forge App - Optional for repository creation, file writes, PRs, and topic updates from Forge
  1. Go to your GitHub organization settings
  2. Navigate to Developer settings > GitHub Apps > New GitHub App
  3. Configure the app:
SettingValue
App nameShoehorn
Homepage URLhttps://shoehorn.example.com
Webhook URLhttps://shoehorn.example.com/api/v1/webhooks/github
Webhook secretGenerate a random secret
  1. Set permissions. The full list, including the security-scanning, deployment, and Actions read scopes used to surface findings per entity, lives on GitHub App permissions. The short version:

    • Read access to repository metadata, contents, custom properties, Dependabot alerts and secrets, deployments, issues, pull requests, secret scanning alerts, security events, and Actions. Read access to organization members, administration, custom properties, and events.
    • Read and write access to repository administration and code.
  2. Subscribe to events:

    • push - Detect manifest changes
    • repository - New repository discovery
    • pull_request - PR workflow events
  3. Generate a private key and download it

  1. From the app settings, click Install App
  2. Select your organization
  3. Choose All repositories or select specific ones

Set these environment variables (or Kubernetes secrets):

Terminal window
GITHUB_APP_ID=123456
GITHUB_APP_INSTALLATION_ID=789012
GITHUB_APP_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----\n..."
GITHUB_ORGANIZATIONS=your-org

The crawler automatically discovers manifests in repositories matching configured patterns:

Terminal window
# Default patterns
GITHUB_MANIFEST_PATTERNS=".shoehorn/**/*.yml,.shoehorn/**/*.yaml,catalog-info.yaml"

When a manifest is found:

  1. The YAML is parsed and validated
  2. An entity is created or updated in the catalog
  3. The entity is linked to the repository
  4. The search index is updated

Shoehorn can infer repository ownership from GitHub topics without a manifest.

Supported topic patterns:

PatternExampleNotes
owner-<team-slug>owner-platform-teamExplicit ownership, highest topic confidence
owner:<team-slug>owner:platform-teamAlso supported
team-<team-slug>team-beta-teamTeam ownership, medium topic confidence
team:<team-slug>team:beta-teamAlso supported

If a manifest also declares an owner, the manifest wins.

READMEs are fetched and displayed on entity detail pages:

Terminal window
# Default patterns
GITHUB_README_PATTERNS="README.md,readme.md,Readme.md,docs/README.md"

Configure the GitHub API rate limit budget:

Terminal window
GITHUB_RATE_LIMIT_PER_HOUR=1000 # Default

The crawler distributes API calls across the budget to avoid hitting GitHub’s rate limits.

For Forge workflows that create repositories, push files, open PRs, or replace topics, create a separate GitHub App:

Terminal window
GITHUB_FORGE_APP_ID=234567
GITHUB_FORGE_INSTALLATION_ID=890123
GITHUB_FORGE_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----\n..."

The Forge app needs different permissions from the main app:

  • Read access to commit statuses, members, and metadata.
  • Read and write access to actions, administration, code, custom properties for repositories, pull requests, and workflows.

Full details on GitHub App permissions.

When webhooks are configured, Shoehorn processes these GitHub events:

EventAction
push to default branchRe-scan manifests in affected repository
repository.createdAdd to discovery queue
repository.deletedMark entities as orphaned