From 49deeec57cebe8029d650c828a132407200dbe97 Mon Sep 17 00:00:00 2001 From: Jerry Feng Date: Wed, 11 Dec 2024 14:00:08 -0500 Subject: [PATCH 1/4] fix: useCommit doesn't always expect flags --- src/services/commit/useCommit.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/commit/useCommit.tsx b/src/services/commit/useCommit.tsx index 5214598e7f..fbd164b4ef 100644 --- a/src/services/commit/useCommit.tsx +++ b/src/services/commit/useCommit.tsx @@ -54,7 +54,7 @@ const UploadSchema = z.object({ provider: z.string().nullable(), createdAt: z.string(), updatedAt: z.string(), - flags: z.array(z.string()).nullable(), + flags: z.array(z.string()).nullish(), jobCode: z.string().nullable(), downloadUrl: z.string(), ciUrl: z.string().nullable(), From 7b7b0b4414fa86157b8e015dba371dc88e512189 Mon Sep 17 00:00:00 2001 From: Jerry Feng Date: Wed, 11 Dec 2024 14:19:14 -0500 Subject: [PATCH 2/4] typing --- src/shared/utils/extractUploads.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/utils/extractUploads.ts b/src/shared/utils/extractUploads.ts index a94c6ab791..d03b5f1ea6 100644 --- a/src/shared/utils/extractUploads.ts +++ b/src/shared/utils/extractUploads.ts @@ -22,7 +22,7 @@ export interface Upload { provider: string | null createdAt: string updatedAt: string - flags: string[] | null + flags: string[] | null | undefined jobCode: string | null downloadUrl: string ciUrl: string | null From 9bf5fe0621b6d9ba8c8a7b4ef186b1ee7a571985 Mon Sep 17 00:00:00 2001 From: Jerry Feng Date: Wed, 11 Dec 2024 14:27:33 -0500 Subject: [PATCH 3/4] typing 2 --- .../CommitDetailPage/CommitCoverage/UploadsCard/RenderError.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/CommitDetailPage/CommitCoverage/UploadsCard/RenderError.tsx b/src/pages/CommitDetailPage/CommitCoverage/UploadsCard/RenderError.tsx index 863fc5e938..2fed55121f 100644 --- a/src/pages/CommitDetailPage/CommitCoverage/UploadsCard/RenderError.tsx +++ b/src/pages/CommitDetailPage/CommitCoverage/UploadsCard/RenderError.tsx @@ -123,7 +123,7 @@ const FlagError = () => ( interface RenderErrorProps { errors: (UploadErrorObject | null)[] state: (typeof UploadStateEnum)[keyof typeof UploadStateEnum] - flags: string[] | null + flags: string[] | null | undefined } const RenderError = ({ errors, state, flags }: RenderErrorProps) => { From 5cec02680c6c09c47590e2a543e568f038290603 Mon Sep 17 00:00:00 2001 From: Jerry Feng Date: Wed, 11 Dec 2024 14:45:14 -0500 Subject: [PATCH 4/4] typing 3 --- src/shared/utils/extractUploads.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/utils/extractUploads.ts b/src/shared/utils/extractUploads.ts index d03b5f1ea6..548cb1f84f 100644 --- a/src/shared/utils/extractUploads.ts +++ b/src/shared/utils/extractUploads.ts @@ -22,7 +22,7 @@ export interface Upload { provider: string | null createdAt: string updatedAt: string - flags: string[] | null | undefined + flags?: string[] | null jobCode: string | null downloadUrl: string ciUrl: string | null