Skip to content

feat: pull catalog data and teams from GitHub#13

Merged
scotwells merged 1 commit into
mainfrom
feat/github-catalog-integration
Jul 1, 2026
Merged

feat: pull catalog data and teams from GitHub#13
scotwells merged 1 commit into
mainfrom
feat/github-catalog-integration

Conversation

@scotwells

@scotwells scotwells commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Why

Today the catalog is populated from hand-assembled entity lists. That doesn't scale and drifts from reality the moment a team ships something. This connects Backstage to GitHub so the portal reflects the org automatically: services describe themselves in-repo, and ownership comes from real GitHub teams.

This is the "how service descriptors are discovered" and "org/team → owner mapping" work from the catalog bootstrap effort.

What this enables

  • Auto-discovery — any repo in the org that ships a catalog-info.yaml is picked up and kept in sync, no central list to maintain. This is what makes the "each service owns its own descriptor" model viable.
  • Real ownership — GitHub org members and teams import as User/Group entities, so owner: on a component resolves to an actual team with members instead of a placeholder group.
  • GitHub App auth — deployed environments authenticate as a GitHub App (org-wide install, higher rate limits, nothing personal to rotate) rather than a personal token.

How it's wired

  • Registers the GitHub discovery and GitHub org catalog backend modules. They read their configuration from catalog.providers.* and stay dormant until that config is supplied, so local dev and e2e are unchanged.
  • The provider config and the GitHub App integration block live commented in the base app-config and are enabled per-environment from the deploy overlay — the same pattern as the datumGateway auth provider.
  • No new secrets required: the GitHub App credentials are already projected into the pod by the existing external-secrets component (backstage-github-appGITHUB_APP_*).

Validation

  • backstage-cli config:check — passes
  • yarn tsc — passes
  • yarn workspace backend lint — passes

Enablement (follow-up)

Turning discovery on in an environment is a config flip in the deploy overlay (uncomment the catalog.providers and integrations.github.apps blocks). That is intentionally a separate step so this change can land without altering any running environment; enable it once the GitHub App is installed on the org.

Notes

Discovery only pulls repos that contain a catalog-info.yaml; the generated/derived slice (deployed state, cross-system edges) continues to come from the infra-side catalog bundle. The two sources merge by entity ref.

Part of the catalog bootstrap: datum-cloud/infra#2967
Builds on #1 (scaffold), #10 (deployable bundle base), #11 (gateway sign-in)

Wire Backstage to source catalog data directly from GitHub so the portal
reflects the org without hand-maintained entity lists.

Key changes:
- Add the GitHub discovery provider so any repo shipping a catalog-info.yaml
  is picked up automatically, and the GitHub org provider so org members and
  teams import as User/Group entities (ownership refs resolve to real teams)
- Register both catalog backend modules; they stay dormant until provider
  config is supplied, so local dev and e2e are unaffected
- Document the GitHub App integration alongside the local PAT, using the
  GITHUB_APP_* credentials the external-secrets component already projects

Provider and App config are commented in the base app-config and enabled
per-environment from the deploy overlay, matching the datumGateway auth
pattern.

Claude-Session: https://claude.ai/code/session_01NMSkwUcaTmZr7S5XmV2aFG
@scotwells
scotwells requested a review from ecv July 1, 2026 18:47
@scotwells
scotwells marked this pull request as ready for review July 1, 2026 18:48
@scotwells
scotwells merged commit 9b6ea45 into main Jul 1, 2026
4 checks passed
@scotwells
scotwells deleted the feat/github-catalog-integration branch July 1, 2026 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants