From 236326f70d6885e826c42856fe53c8f74df1c765 Mon Sep 17 00:00:00 2001 From: Aleksandra Date: Thu, 2 Nov 2023 09:02:51 +0100 Subject: [PATCH] add link to a github commit for schema checks (#3187) --- .../api/src/modules/schema/module.graphql.ts | 12 ++++++++++++ .../[projectId]/[targetId]/checks.tsx | 13 ++++++++++++- .../[projectId]/[targetId]/history.tsx | 2 +- 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/packages/services/api/src/modules/schema/module.graphql.ts b/packages/services/api/src/modules/schema/module.graphql.ts index 9c57d988b..3ad2856c2 100644 --- a/packages/services/api/src/modules/schema/module.graphql.ts +++ b/packages/services/api/src/modules/schema/module.graphql.ts @@ -755,6 +755,10 @@ export default gql` The URL of the schema check on the Hive Web App. """ webUrl: String + """ + The GitHub repository associated with the schema check. + """ + githubRepository: String breakingSchemaChanges: SchemaChangeConnection safeSchemaChanges: SchemaChangeConnection @@ -789,6 +793,10 @@ export default gql` The URL of the schema check on the Hive Web App. """ webUrl: String + """ + The GitHub repository associated with the schema check. + """ + githubRepository: String """ Breaking changes can exist in an successful schema check if the check was manually approved. @@ -840,6 +848,10 @@ export default gql` The URL of the schema check on the Hive Web App. """ webUrl: String + """ + The GitHub repository associated with the schema check. + """ + githubRepository: String compositionErrors: SchemaErrorConnection diff --git a/packages/web/app/pages/[organizationId]/[projectId]/[targetId]/checks.tsx b/packages/web/app/pages/[organizationId]/[projectId]/[targetId]/checks.tsx index 89ed83dad..23cd7c140 100644 --- a/packages/web/app/pages/[organizationId]/[projectId]/[targetId]/checks.tsx +++ b/packages/web/app/pages/[organizationId]/[projectId]/[targetId]/checks.tsx @@ -26,7 +26,7 @@ import { CriticalityLevel } from '@/gql/graphql'; import { useRouteSelector } from '@/lib/hooks'; import { withSessionProtection } from '@/lib/supertokens/guard'; import { cn } from '@/lib/utils'; -import { ListBulletIcon } from '@radix-ui/react-icons'; +import { ExternalLinkIcon, ListBulletIcon } from '@radix-ui/react-icons'; import * as ToggleGroup from '@radix-ui/react-toggle-group'; const SchemaChecks_NavigationQuery = graphql(` @@ -49,6 +49,7 @@ const SchemaChecks_NavigationQuery = graphql(` commit author } + githubRepository } } pageInfo { @@ -126,6 +127,16 @@ const Navigation = (props: { ) : null} + {edge.node.githubRepository && edge.node.meta ? ( + + associated with Git commit + + ) : null} ))} {props.isLastPage && query.data.target.schemaChecks.pageInfo.hasNextPage && ( diff --git a/packages/web/app/pages/[organizationId]/[projectId]/[targetId]/history.tsx b/packages/web/app/pages/[organizationId]/[projectId]/[targetId]/history.tsx index 9e42bd6a8..885d2e725 100644 --- a/packages/web/app/pages/[organizationId]/[projectId]/[targetId]/history.tsx +++ b/packages/web/app/pages/[organizationId]/[projectId]/[targetId]/history.tsx @@ -133,7 +133,7 @@ function ListPage({ {version.githubMetadata ? (