From 90461a7eac7a5a321ec59dcdf8e48bc77a358e42 Mon Sep 17 00:00:00 2001 From: lewtakm Date: Mon, 12 Oct 2020 12:50:37 +0200 Subject: [PATCH 1/3] feat: Add Pull Request plugin to sample app. --- packages/app/package.json | 2 +- .../app/src/components/catalog/EntityPage.tsx | 11 +++++++++++ yarn.lock | 16 ++++++++-------- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/packages/app/package.json b/packages/app/package.json index a3b150cef6..bc0b50eaf5 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -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", diff --git a/packages/app/src/components/catalog/EntityPage.tsx b/packages/app/src/components/catalog/EntityPage.tsx index 393ffe2631..e8b9a95fda 100644 --- a/packages/app/src/components/catalog/EntityPage.tsx +++ b/packages/app/src/components/catalog/EntityPage.tsx @@ -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={} /> + } + /> ); @@ -195,6 +201,11 @@ const WebsiteEntityPage = ({ entity }: { entity: Entity }) => ( title="Kubernetes" element={} /> + } + /> ); const DefaultEntityPage = ({ entity }: { entity: Entity }) => ( diff --git a/yarn.lock b/yarn.lock index 34d0287c42..4f76b0a66b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3639,15 +3639,15 @@ resolved "https://registry.npmjs.org/@rjsf/material-ui/-/material-ui-2.3.0.tgz#a051eb4db2ad778e39933a31ba806f415dd3ba90" integrity sha512-v/xZ4Xk18ZgBARcCe99IDqdO97GU0UC784gG8PhGGFDdy5Rbdy7ixTjHkGYttkr43PB7SX6ttohNhkKSW4nATQ== -"@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" - integrity sha512-IJGMys5FJ512sitaMwWgACll3ZTuE3nZUX05MNXly/WXty6VBcfboiPbSB6IzLAEWMmvYlV1YUwwL7hAl/62GQ== +"@roadiehq/backstage-plugin-github-pull-requests@^0.5.1": + version "0.5.1" + resolved "https://registry.npmjs.org/@roadiehq/backstage-plugin-github-pull-requests/-/backstage-plugin-github-pull-requests-0.5.1.tgz#a0e3ef97de20fe87e55a26f0198d4ff80b6ecd8c" + integrity sha512-0Btg4jn7SWAp/0A7+xCuHxD4LKPoE3LSEkjMvLmWk/AIIvNA6uSWXeAv1nJZSe4JBV0Qzt+r+TS+hCcFR+vcMg== dependencies: - "@backstage/catalog-model" "^0.1.1-alpha.23" - "@backstage/core" "^0.1.1-alpha.23" - "@backstage/plugin-catalog" "^0.1.1-alpha.23" - "@backstage/theme" "^0.1.1-alpha.23" + "@backstage/catalog-model" "^0.1.1-alpha.24" + "@backstage/core" "^0.1.1-alpha.24" + "@backstage/plugin-catalog" "^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.56" From 65d7224554ab789951e327849f58d326ae3acce9 Mon Sep 17 00:00:00 2001 From: lewtakm Date: Mon, 12 Oct 2020 13:00:19 +0200 Subject: [PATCH 2/3] feat: add changeset --- .changeset/beige-apes-serve.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/beige-apes-serve.md diff --git a/.changeset/beige-apes-serve.md b/.changeset/beige-apes-serve.md new file mode 100644 index 0000000000..54ee39a85e --- /dev/null +++ b/.changeset/beige-apes-serve.md @@ -0,0 +1,5 @@ +--- +'example-app': patch +--- + +Add Pull Request tab to components view. From d9bfacffadf0fe35f5a83128ebc4bbb4450e9754 Mon Sep 17 00:00:00 2001 From: lewtakm Date: Mon, 12 Oct 2020 13:07:48 +0200 Subject: [PATCH 3/3] fix: update component name --- packages/app/src/components/catalog/EntityPage.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/app/src/components/catalog/EntityPage.tsx b/packages/app/src/components/catalog/EntityPage.tsx index e8b9a95fda..ed63e26e79 100644 --- a/packages/app/src/components/catalog/EntityPage.tsx +++ b/packages/app/src/components/catalog/EntityPage.tsx @@ -54,7 +54,7 @@ import { LastLighthouseAuditCard, isPluginApplicableToEntity as isLighthouseAvailable, } from '@backstage/plugin-lighthouse/'; -import { Router as GithubPullRequestsRouter } from '@roadiehq/backstage-plugin-github-pull-requests'; +import { Router as PullRequestsRouter } 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. @@ -164,7 +164,7 @@ const ServiceEntityPage = ({ entity }: { entity: Entity }) => ( } + element={} /> ); @@ -204,7 +204,7 @@ const WebsiteEntityPage = ({ entity }: { entity: Entity }) => ( } + element={} /> );