From d3af30b47d8d5a9879456adcf5acbb9343ee3790 Mon Sep 17 00:00:00 2001 From: djamaile Date: Fri, 11 Mar 2022 20:22:00 +0100 Subject: [PATCH] chore: run prettier to prevent build from failing Signed-off-by: djamaile --- .changeset/proud-news-perform.md | 5 +++++ packages/app/src/apis.ts | 10 +++++----- packages/app/src/components/catalog/EntityPage.tsx | 2 +- plugins/cicd-statistics-module-gitlab/src/api/index.ts | 2 +- plugins/cicd-statistics/src/apis/types.ts | 2 +- .../cicd-statistics/src/components/button-switch.tsx | 3 --- plugins/cicd-statistics/src/entity-page.tsx | 2 -- plugins/cicd-statistics/src/utils/stage-names.ts | 4 +--- 8 files changed, 14 insertions(+), 16 deletions(-) create mode 100644 .changeset/proud-news-perform.md diff --git a/.changeset/proud-news-perform.md b/.changeset/proud-news-perform.md new file mode 100644 index 0000000000..20259c33e5 --- /dev/null +++ b/.changeset/proud-news-perform.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-cicd-statistics-module-gitlab': minor +--- + +Will update this once the PR is ready to be merged diff --git a/packages/app/src/apis.ts b/packages/app/src/apis.ts index afc96a68db..7214a96688 100644 --- a/packages/app/src/apis.ts +++ b/packages/app/src/apis.ts @@ -32,10 +32,11 @@ import { configApiRef, createApiFactory, errorApiRef, - githubAuthApiRef, gitlabAuthApiRef, + githubAuthApiRef, + gitlabAuthApiRef, } from '@backstage/core-plugin-api'; import { cicdStatisticsApiRef } from '@backstage/plugin-cicd-statistics'; -import {CicdStatisticsApiGitlab} from "@backstage/plugin-cicd-statistics-module-gitlab"; +import { CicdStatisticsApiGitlab } from '@backstage/plugin-cicd-statistics-module-gitlab'; export const apis: AnyApiFactory[] = [ createApiFactory({ @@ -44,7 +45,6 @@ export const apis: AnyApiFactory[] = [ factory: ({ configApi }) => ScmIntegrationsApi.fromConfig(configApi), }), - ScmAuth.createDefaultApiFactory(), createApiFactory({ @@ -69,10 +69,10 @@ export const apis: AnyApiFactory[] = [ createApiFactory(costInsightsApiRef, new ExampleCostInsightsClient()), createApiFactory({ api: cicdStatisticsApiRef, - deps: {gitlabAuthApi: gitlabAuthApiRef}, + deps: { gitlabAuthApi: gitlabAuthApiRef }, factory({ gitlabAuthApi }) { return new CicdStatisticsApiGitlab(gitlabAuthApi); }, }), -// createApiFactory(cicdStatisticsApiRef, new CicdStatisticsApiGitlab()), + // createApiFactory(cicdStatisticsApiRef, new CicdStatisticsApiGitlab()), ]; diff --git a/packages/app/src/components/catalog/EntityPage.tsx b/packages/app/src/components/catalog/EntityPage.tsx index 89897905b8..3ade051077 100644 --- a/packages/app/src/components/catalog/EntityPage.tsx +++ b/packages/app/src/components/catalog/EntityPage.tsx @@ -136,7 +136,7 @@ import { EntityNewRelicDashboardCard, } from '@backstage/plugin-newrelic-dashboard'; import { EntityGoCdContent, isGoCdAvailable } from '@backstage/plugin-gocd'; -import {EntityCicdStatisticsContent} from "@backstage/plugin-cicd-statistics"; +import { EntityCicdStatisticsContent } from '@backstage/plugin-cicd-statistics'; import React, { ReactNode, useMemo, useState } from 'react'; diff --git a/plugins/cicd-statistics-module-gitlab/src/api/index.ts b/plugins/cicd-statistics-module-gitlab/src/api/index.ts index 686c8b5f63..21f5f622a6 100644 --- a/plugins/cicd-statistics-module-gitlab/src/api/index.ts +++ b/plugins/cicd-statistics-module-gitlab/src/api/index.ts @@ -14,4 +14,4 @@ * limitations under the License. */ -export * from "./gitlab"; +export * from './gitlab'; diff --git a/plugins/cicd-statistics/src/apis/types.ts b/plugins/cicd-statistics/src/apis/types.ts index 975f69525c..32d9d3f2df 100644 --- a/plugins/cicd-statistics/src/apis/types.ts +++ b/plugins/cicd-statistics/src/apis/types.ts @@ -117,7 +117,7 @@ export interface Build { duration: number; /** Top-level build stages */ - stages?: Array; + stages: Array; } /** diff --git a/plugins/cicd-statistics/src/components/button-switch.tsx b/plugins/cicd-statistics/src/components/button-switch.tsx index 89a5f7735a..65f55eee41 100644 --- a/plugins/cicd-statistics/src/components/button-switch.tsx +++ b/plugins/cicd-statistics/src/components/button-switch.tsx @@ -78,9 +78,6 @@ export function ButtonSwitch(props: ButtonSwitchProps) { ); const value = switchValue(values[index]); - if(!value){ - console.log(values[index]); - } if (props.multi) { props.onChange( props.selection.includes(value as T) diff --git a/plugins/cicd-statistics/src/entity-page.tsx b/plugins/cicd-statistics/src/entity-page.tsx index 8c3209c854..3c51dabf2a 100644 --- a/plugins/cicd-statistics/src/entity-page.tsx +++ b/plugins/cicd-statistics/src/entity-page.tsx @@ -166,8 +166,6 @@ function CicdCharts(props: CicdChartsProps) { errorApi.post(chartableStagesState.error); }, [errorApi, chartableStagesState.error]); - console.log(chartableStagesState); - return ( diff --git a/plugins/cicd-statistics/src/utils/stage-names.ts b/plugins/cicd-statistics/src/utils/stage-names.ts index 8853336fef..69c8cdcf25 100644 --- a/plugins/cicd-statistics/src/utils/stage-names.ts +++ b/plugins/cicd-statistics/src/utils/stage-names.ts @@ -68,8 +68,6 @@ export async function cleanupBuildTree( return map(builds, { chunk: 'idle' }, build => ({ ...build, - stages: build.stages - ? build.stages.map(stage => recurseStage(stage, [])) - : [], + stages: build.stages.map(stage => recurseStage(stage, [])), })); }