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:
PermissionAccessPurpose
Repository: ContentsReadRead manifests, READMEs, changelogs
Repository: MetadataReadList repositories and topics
Repository: Pull requestsReadTrack PR activity for insights
Organization: MembersReadSync organization membership
  1. Subscribe to events:

    • push - Detect manifest changes
    • repository - New repository discovery
    • pull_request - PR workflow events
  2. 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 additional permissions:

  • Repository: Contents - Read & Write
  • Repository: Pull requests - Read & Write
  • Organization: Administration - Read

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