File tree Expand file tree Collapse file tree 2 files changed +3
-10
lines changed Expand file tree Collapse file tree 2 files changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ import type { WorkflowRunEvent } from "@octokit/webhooks-types";
44import { db } from "@ctrlplane/db/client" ;
55import * as schema from "@ctrlplane/db/schema" ;
66import { Event , sendGoEvent } from "@ctrlplane/events" ;
7- import { logger } from "@ctrlplane/logger" ;
87import { ReservedMetadataKey } from "@ctrlplane/validators/conditions" ;
98import { exitedStatus , JobStatus } from "@ctrlplane/validators/jobs" ;
109
@@ -71,12 +70,8 @@ const generateOapiEvent = (
7170 } = event . workflow_run ;
7271
7372 const jobId = extractUuid ( name ) ;
74- if ( jobId == null ) {
75- logger . warn ( "Could not extract jobId from github workflow event" , {
76- name,
77- } ) ;
78- return null ;
79- }
73+ if ( jobId == null ) return null ;
74+
8075 const updatedAt = new Date ( updated_at ) ;
8176 const status =
8277 conclusion != null
@@ -131,7 +126,7 @@ const getAllWorkspaceIds = () =>
131126
132127export const handleWorkflowRunEvent = async ( event : WorkflowRunEvent ) => {
133128 const oapiEvent = generateOapiEvent ( event ) ;
134- if ( oapiEvent == null ) throw new Error ( "Failed to generate OAPI event" ) ;
129+ if ( oapiEvent == null ) return ;
135130 const workspaceIds = await getAllWorkspaceIds ( ) ;
136131
137132 for ( const workspaceId of workspaceIds )
Original file line number Diff line number Diff line change @@ -103,8 +103,6 @@ const postDeployment: AsyncTypedHandler<
103103 jobAgentConfig : body . jobAgentConfig ?? { } ,
104104 } ;
105105
106- console . log ( deployment ) ;
107-
108106 const isValid = await validResourceSelector ( body . resourceSelector ) ;
109107 if ( ! isValid ) throw new ApiError ( "Invalid resource selector" , 400 ) ;
110108
You can’t perform that action at this time.
0 commit comments