GitHub Insights Plugin for Backstage
Plugin Setup
- If you have standalone app (you didn't clone this repo), then do
yarn add @roadiehq/backstage-plugin-github-insights
- Add plugin to the list of plugins:
export { plugin as GitHubInsights } from '@roadiehq/backstage-plugin-github-insights';
- Add plugin API to your Backstage instance:
import { Router as GitHubInsightsRouter } from '@roadiehq/backstage-plugin-github-insights';
...
const ServiceEntityPage = ({ entity }: { entity: Entity }) => (
<EntityPageLayout>
...
<EntityPageLayout.Content
path="/code-insights"
title="Code Insights"
element={<GitHubInsightsRouter entity={entity} />}
/>
</EntityPageLayout>
- Run backstage app with
yarn start
and navigate to services tabs.
Widgets setup
-
You must install plugin by following the steps above to add widgets to your Overview. You might add only selected widgets or all of them.
-
Add widgets to your Overview tab:
import {
ContributorsCard,
LanguagesCard,
ReadMeCard,
ReleasesCard,
isPluginApplicableToEntity as isGitHubAvailable,
} from '@roadiehq/backstage-plugin-github-insights';
...
const OverviewContent = ({ entity }: { entity: Entity }) => (
<Grid container spacing={3}>
...
{isGitHubAvailable(entity) && (
<>
<Grid item md={6}>
<ContributorsCard entity={entity} />
<LanguagesCard entity={entity} />
<ReleasesCard entity={entity} />
</Grid>
<Grid item md={6}>
<ReadMeCard entity={entity} />
</Grid>
</>
)}
</Grid>
);
Features
- Add GitHub Insights plugin tab.
- Show widgets about repository contributors, languages, readme and release at overview page.
Links