Bladeren bron

fix build metadata types (#3646)

Feroze Mohideen 2 jaren geleden
bovenliggende
commit
f61606719f

+ 1 - 1
dashboard/src/main/home/app-dashboard/app-view/tabs/activity-feed/events/focus-views/BuildFailureEventFocusView.tsx

@@ -37,7 +37,7 @@ const BuildFailureEventFocusView: React.FC<Props> = ({
     }, [isLoading, logs, scrollToBottomRef]);
 
     const getBuildLogs = async () => {
-        if (event == null || porterApp.git_repo_id == null || porterApp.repo_name == null) {
+        if (event == null || porterApp.git_repo_id == null || porterApp.repo_name == null || event.metadata.action_run_id == null) {
             return;
         }
         try {

+ 3 - 3
dashboard/src/main/home/app-dashboard/app-view/tabs/activity-feed/events/types.ts

@@ -22,9 +22,9 @@ const porterAppDeployEventMetadataValidator = z.object({
     })),
 });
 const porterAppBuildEventMetadataValidator = z.object({
-    repo: z.string(),
-    action_run_id: z.number(),
-    github_account_id: z.number(),
+    repo: z.string().optional(),
+    action_run_id: z.number().optional(),
+    github_account_id: z.number().optional(),
     end_time: z.string().optional(),
 })
 const porterAppPreDeployEventMetadataValidator = z.object({