diff --git a/plugins/git-release-manager/src/features/Stats/DialogBody.tsx b/plugins/git-release-manager/src/features/Stats/DialogBody.tsx index 04c64b7b07..219bc2a146 100644 --- a/plugins/git-release-manager/src/features/Stats/DialogBody.tsx +++ b/plugins/git-release-manager/src/features/Stats/DialogBody.tsx @@ -17,7 +17,6 @@ import React from 'react'; import { Alert } from '@material-ui/lab'; import { - Box, makeStyles, Table, TableBody, @@ -70,20 +69,6 @@ export function DialogBody() { project, }); - const shouldWarn = - releaseStats.unmappableTags.length > 0 || - releaseStats.unmatchedTags.length > 0 || - releaseStats.unmatchedReleases.length > 0; - - if (shouldWarn) { - // eslint-disable-next-line no-console - console.log("⚠️ Here's a summary of unmapped/unmatched tags/releases", { - unmatchedReleases: releaseStats.unmatchedReleases, - unmatchedTags: releaseStats.unmatchedTags, - unmappableTags: releaseStats.unmappableTags, - }); - } - return ( @@ -115,7 +100,9 @@ export function DialogBody() { - {shouldWarn && } + {(releaseStats.unmappableTags.length > 0 || + releaseStats.unmatchedTags.length > 0 || + releaseStats.unmatchedReleases.length > 0) && } ); diff --git a/plugins/git-release-manager/src/features/Stats/Warn.tsx b/plugins/git-release-manager/src/features/Stats/Warn.tsx index 93c2cc4154..24997cc9b3 100644 --- a/plugins/git-release-manager/src/features/Stats/Warn.tsx +++ b/plugins/git-release-manager/src/features/Stats/Warn.tsx @@ -16,6 +16,7 @@ import React from 'react'; import { Alert } from '@material-ui/lab'; +import { Box, Button } from '@material-ui/core'; import { useProjectContext } from '../../contexts/ProjectContext'; import { useReleaseStatsContext } from './contexts/ReleaseStatsContext'; @@ -25,30 +26,48 @@ export const Warn = () => { const { project } = useProjectContext(); return ( - - {releaseStats.unmappableTags.length > 0 && ( -
- Failed to map {releaseStats.unmappableTags.length}{' '} - tags to releases -
- )} + + + {releaseStats.unmappableTags.length > 0 && ( +
+ Failed to map {releaseStats.unmappableTags.length}{' '} + tags to releases +
+ )} - {releaseStats.unmatchedTags.length > 0 && ( -
- Failed to match {releaseStats.unmatchedTags.length}{' '} - tags to {project.versioningStrategy} -
- )} + {releaseStats.unmatchedTags.length > 0 && ( +
+ Failed to match {releaseStats.unmatchedTags.length}{' '} + tags to {project.versioningStrategy} +
+ )} - {releaseStats.unmatchedReleases.length > 0 && ( -
- Failed to match{' '} - {releaseStats.unmatchedReleases.length} releases to{' '} - {project.versioningStrategy} -
- )} + {releaseStats.unmatchedReleases.length > 0 && ( +
+ Failed to match{' '} + {releaseStats.unmatchedReleases.length} releases to{' '} + {project.versioningStrategy} +
+ )} -
See full output in the console
-
+ + + +
+ ); };