feat: Add Pull Request plugin to sample app.

This commit is contained in:
lewtakm
2020-10-12 12:50:37 +02:00
parent e3f4fdbad7
commit 90461a7eac
3 changed files with 20 additions and 9 deletions
+1 -1
View File
@@ -34,7 +34,7 @@
"@material-ui/core": "^4.11.0",
"@material-ui/icons": "^4.9.1",
"@octokit/rest": "^18.0.0",
"@roadiehq/backstage-plugin-github-pull-requests": "^0.4.3",
"@roadiehq/backstage-plugin-github-pull-requests": "^0.5.1",
"@roadiehq/backstage-plugin-travis-ci": "^0.2.3",
"dayjs": "^1.9.1",
"history": "^5.0.0",
@@ -54,6 +54,7 @@ import {
LastLighthouseAuditCard,
isPluginApplicableToEntity as isLighthouseAvailable,
} from '@backstage/plugin-lighthouse/';
import { Router as GithubPullRequestsRouter } from '@roadiehq/backstage-plugin-github-pull-requests';
const CICDSwitcher = ({ entity }: { entity: Entity }) => {
// This component is just an example of how you can implement your company's logic in entity page.
@@ -160,6 +161,11 @@ const ServiceEntityPage = ({ entity }: { entity: Entity }) => (
title="Kubernetes"
element={<KubernetesRouter entity={entity} />}
/>
<EntityPageLayout.Content
path="/pull-requests"
title="Pull Requests"
element={<GithubPullRequestsRouter entity={entity} />}
/>
</EntityPageLayout>
);
@@ -195,6 +201,11 @@ const WebsiteEntityPage = ({ entity }: { entity: Entity }) => (
title="Kubernetes"
element={<KubernetesRouter entity={entity} />}
/>
<EntityPageLayout.Content
path="/pull-requests"
title="Pull Requests"
element={<GithubPullRequestsRouter entity={entity} />}
/>
</EntityPageLayout>
);
const DefaultEntityPage = ({ entity }: { entity: Entity }) => (