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:
@@ -0,0 +1,9 @@
|
||||
---
|
||||
title: GitHub Insights
|
||||
author: roadie.io
|
||||
authorUrl: https://roadie.io
|
||||
category: Monitoring
|
||||
description: View GitHub Insights for your components in Backstage.
|
||||
documentation: https://roadie.io/backstage/plugins/github-insights
|
||||
iconUrl: https://roadie.io/static/2ad5123c425908efde0c922d707e737b/06c84/code-icon.png
|
||||
npmPackageName: '@roadiehq/backstage-plugin-github-insights'
|
||||
@@ -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 }) => (
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -3650,6 +3650,24 @@
|
||||
resolved "https://registry.npmjs.org/@rjsf/material-ui/-/material-ui-2.3.0.tgz#a051eb4db2ad778e39933a31ba806f415dd3ba90"
|
||||
integrity sha512-v/xZ4Xk18ZgBARcCe99IDqdO97GU0UC784gG8PhGGFDdy5Rbdy7ixTjHkGYttkr43PB7SX6ttohNhkKSW4nATQ==
|
||||
|
||||
"@roadiehq/backstage-plugin-github-insights@^0.2.2":
|
||||
version "0.2.2"
|
||||
resolved "https://registry.npmjs.org/@roadiehq/backstage-plugin-github-insights/-/backstage-plugin-github-insights-0.2.2.tgz#1647aec22f1f8bc40268f075ae307abf660ae75c"
|
||||
integrity sha512-m4j1kUmoj+ZCRyaisXVBkLW9kaI/OGMq8xzthm4adOb12mS0s2p2P9AMa4T+bRyLgHpQ0vB75qhw4p6sHJAvWA==
|
||||
dependencies:
|
||||
"@backstage/catalog-model" "^0.1.1-alpha.24"
|
||||
"@backstage/core" "^0.1.1-alpha.24"
|
||||
"@backstage/theme" "^0.1.1-alpha.24"
|
||||
"@material-ui/core" "^4.11.0"
|
||||
"@material-ui/icons" "^4.9.1"
|
||||
"@material-ui/lab" "4.0.0-alpha.45"
|
||||
history "^5.0.0"
|
||||
react "^16.13.1"
|
||||
react-dom "^16.13.1"
|
||||
react-markdown "^4.3.1"
|
||||
react-router "^6.0.0-beta.0"
|
||||
react-use "^15.3.3"
|
||||
|
||||
"@roadiehq/backstage-plugin-github-pull-requests@^0.4.3":
|
||||
version "0.4.3"
|
||||
resolved "https://registry.npmjs.org/@roadiehq/backstage-plugin-github-pull-requests/-/backstage-plugin-github-pull-requests-0.4.3.tgz#720fd3c53ae8e61d8cfc727cda47e236af442b02"
|
||||
@@ -19374,7 +19392,7 @@ react-router@5.2.0:
|
||||
tiny-invariant "^1.0.2"
|
||||
tiny-warning "^1.0.0"
|
||||
|
||||
react-router@6.0.0-beta.0:
|
||||
react-router@6.0.0-beta.0, react-router@^6.0.0-beta.0:
|
||||
version "6.0.0-beta.0"
|
||||
resolved "https://registry.npmjs.org/react-router/-/react-router-6.0.0-beta.0.tgz#3e11f39b6ded4412c2fed9e4f989dd4c8156724d"
|
||||
integrity sha512-VgMdfpVcmFQki/LZuLh8E/MNACekDetz4xqft+a6fBZvvJnVqKbLqebF7hyoawGrV1HcO5tVaUang2Og4W2j1Q==
|
||||
|
||||
Reference in New Issue
Block a user