File tree Expand file tree Collapse file tree
services/apps/script_executor_worker/src/bin Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -141,17 +141,20 @@ async function onboardProjectsFromCsv(
141141 failedProjects . push ( { ...project , reason : 'project creation' } )
142142 }
143143
144- try {
145- // Create GitHub integration
146- await createGithubIntegration ( project , segmentId , bearerToken )
147- log . info ( `Created GitHub integration for project ${ project . name } ` )
148-
149- successCount ++
150- } catch ( error ) {
151- const errorMsg = `Failed to process project ${ project . name } : ${ error . message } `
152- log . error ( error , errorMsg )
153- errors . push ( errorMsg )
154- failedProjects . push ( { ...project , reason : 'integration creation' } )
144+ // Don't create integration if project creation failed
145+ if ( segmentId ) {
146+ try {
147+ // Create GitHub integration
148+ await createGithubIntegration ( project , segmentId , bearerToken )
149+ log . info ( `Created GitHub integration for project ${ project . name } ` )
150+
151+ successCount ++
152+ } catch ( error ) {
153+ const errorMsg = `Failed to process project ${ project . name } : ${ error . message } `
154+ log . error ( error , errorMsg )
155+ errors . push ( errorMsg )
156+ failedProjects . push ( { ...project , reason : 'integration creation' } )
157+ }
155158 }
156159
157160 // Wait 15 seconds before processing next project (except for the last one)
You can’t perform that action at this time.
0 commit comments