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β
| Where | What |
|---|---|
| GitHub tab | Three 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 Overview | The 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β
-
In Administration, under PLATFORM, click Plugins.
-
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.yamlfile on GitHub (for examplehttps://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!