Merge pull request #2861 from RoadieHQ/lewtakm/add-pull-requests-to-overview

feat: add pull requests widget to overview page of the component
This commit is contained in:
Marcus Eide
2020-10-13 11:07:06 +02:00
committed by GitHub
2 changed files with 10 additions and 1 deletions
+1 -1
View File
@@ -34,8 +34,8 @@
"@material-ui/core": "^4.11.0",
"@material-ui/icons": "^4.9.1",
"@octokit/rest": "^18.0.0",
"@roadiehq/backstage-plugin-github-pull-requests": "^0.5.1",
"@roadiehq/backstage-plugin-github-insights": "^0.2.2",
"@roadiehq/backstage-plugin-github-pull-requests": "^0.4.3",
"@roadiehq/backstage-plugin-travis-ci": "^0.2.3",
"dayjs": "^1.9.1",
"history": "^5.0.0",
@@ -61,6 +61,10 @@ import {
LastLighthouseAuditCard,
isPluginApplicableToEntity as isLighthouseAvailable,
} from '@backstage/plugin-lighthouse/';
import {
isPluginApplicableToEntity as isPullRequestsAvailable,
PullRequestsStatsCard,
} 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.
@@ -143,6 +147,11 @@ const OverviewContent = ({ entity }: { entity: Entity }) => (
<LastLighthouseAuditCard />
</Grid>
)}
{isPullRequestsAvailable(entity) && (
<Grid item sm={4}>
<PullRequestsStatsCard entity={entity} />
</Grid>
)}
</Grid>
);