Skip to main content

Show the GitHub tab on a component

Each annotated component gets a GitHub tab and a GitHub releases card on its Overview.

Two steps: turn on the plugin, annotate the component.

What it shows, and to whom​

WhereWhat
GitHub tabThree sub-tabs with their count: Pipelines (Workflow, Branch, Result, Started by, Started), Pull requests (Pull request, Author, Branch, Updated), Branches (the default one marked default, protected ones protected)
GitHub releases card of the OverviewThe latest releases of the repository, with their tag, title and date

The Pipelines sub-tab lists the latest workflow runs, whoever started them. Anyone who can open the component sees all of this. Astrolabe reads GitHub with the administrator's token, the same for everyone.

1. πŸ”Œ Turn on the plugin​

  1. In Administration, under PLATFORM, click Plugins.

  2. On the GitHub card, click the switch at the top right of the card. It turns on at once, without confirmation.

2. 🏷️ Annotate the component​

In the component's catalog-info.yaml, name its repository as <owner>/<repository>:

apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: shop-api
annotations:
github.com/project-slug: acme/shop-api # <owner>/<repository> on GitHub
spec:
type: service
lifecycle: production
owner: group:default/platform-team

3. πŸ“₯ Put the component in the catalog​

  • One component: in the sidebar, click Catalog, then Register an existing component at the top right. Paste the address of the catalog-info.yaml file on GitHub (for example https://github.com/acme/shop-api/blob/main/catalog-info.yaml), click Analyze, then Import, then View Component.
  • A whole organization: use the GitHub catalog provider. See Import your GitHub repositories.

βœ… Check​

Open the component. The GitHub tab is after Docs. The Overview shows a GitHub releases card.

βœ… That's it!

Next: Add the GitHub cards to your dashboard.