Add Code Insights plugin to sample app and marketplace (#2833)

* feat - add code insights plugin to sample app and plugin to marketplace

* feat - update plugin package version

* Update code-insights.yaml

Add an empty lane on the end of the file.

* Update plugins.ts

Add an empty lane at the end of the file after conflicts resolve.

* Update code-insights.yaml

* Update code-insights.yaml

* Update code-insights.yaml

* feat: update sample app with github insight plugin

* Update github-insights.yaml

* Update EntityPage.tsx
This commit is contained in:
Mateusz Lewtak
2020-10-12 18:42:30 +02:00
committed by GitHub
parent 83d3f59b8c
commit 08c392815b
5 changed files with 58 additions and 1 deletions
+1
View File
@@ -36,6 +36,7 @@
"@octokit/rest": "^18.0.0",
"@roadiehq/backstage-plugin-github-pull-requests": "^0.4.3",
"@roadiehq/backstage-plugin-travis-ci": "^0.2.3",
"@roadiehq/backstage-plugin-github-insights": "^0.2.2",
"dayjs": "^1.9.1",
"history": "^5.0.0",
"prop-types": "^15.7.2",
@@ -40,6 +40,13 @@ import { Router as ApiDocsRouter } from '@backstage/plugin-api-docs';
import { Router as SentryRouter } from '@backstage/plugin-sentry';
import { EmbeddedDocsRouter as DocsRouter } from '@backstage/plugin-techdocs';
import { Router as KubernetesRouter } from '@backstage/plugin-kubernetes';
import {
Router as GitHubInsightsRouter,
isPluginApplicableToEntity as isGitHubAvailable,
ReadMeCard,
LanguagesCard,
ReleasesCard,
} from '@roadiehq/backstage-plugin-github-insights';
import React, { ReactNode } from 'react';
import {
AboutCard,
@@ -120,6 +127,17 @@ const OverviewContent = ({ entity }: { entity: Entity }) => (
<AboutCard entity={entity} />
</Grid>
<RecentCICDRunsSwitcher entity={entity} />
{isGitHubAvailable(entity) && (
<>
<Grid item md={6}>
<LanguagesCard entity={entity} />
<ReleasesCard entity={entity} />
</Grid>
<Grid item md={6}>
<ReadMeCard entity={entity} maxHeight={350} />
</Grid>
</>
)}
{isLighthouseAvailable(entity) && (
<Grid item sm={4}>
<LastLighthouseAuditCard />
@@ -160,6 +178,11 @@ const ServiceEntityPage = ({ entity }: { entity: Entity }) => (
title="Kubernetes"
element={<KubernetesRouter entity={entity} />}
/>
<EntityPageLayout.Content
path="/code-insights"
title="Code Insights"
element={<GitHubInsightsRouter entity={entity} />}
/>
</EntityPageLayout>
);
@@ -195,6 +218,11 @@ const WebsiteEntityPage = ({ entity }: { entity: Entity }) => (
title="Kubernetes"
element={<KubernetesRouter entity={entity} />}
/>
<EntityPageLayout.Content
path="/code-insights"
title="Code Insights"
element={<GitHubInsightsRouter entity={entity} />}
/>
</EntityPageLayout>
);
const DefaultEntityPage = ({ entity }: { entity: Entity }) => (
+1
View File
@@ -36,4 +36,5 @@ export { plugin as GcpProjects } from '@backstage/plugin-gcp-projects';
export { plugin as Kubernetes } from '@backstage/plugin-kubernetes';
export { plugin as Cloudbuild } from '@backstage/plugin-cloudbuild';
export { plugin as CostInsights } from '@backstage/plugin-cost-insights';
export { plugin as GitHubInsights } from '@roadiehq/backstage-plugin-github-insights';
export { plugin as UserSettings } from '@backstage/plugin-user-settings';