diff --git a/api/controllers/v1/slack.ts b/api/controllers/v1/slack.ts index 614e5ef00..3b2ba2963 100644 --- a/api/controllers/v1/slack.ts +++ b/api/controllers/v1/slack.ts @@ -88,6 +88,7 @@ async function deployRepo(deployable: Array, logger: ILogger, jobRepository // Used solely for adding parallel deploy jobs to another array const deployHelper = (deployable, payload, jobTitle, jobUserName, jobUserEmail) => { + console.log('inside deploy helper!'); deployable.push(createJob({ ...payload }, jobTitle, jobUserName, jobUserEmail)); }; @@ -124,6 +125,7 @@ export const getDeployableJobs = async ( const non_versioned = repoInfo.branches.length === 1; const branchObject = await repoBranchesRepository.getRepoBranchAliases(repoName, branchName, repoInfo.project); + console.log(JSON.stringify(branchObject)); if (!branchObject?.aliasObject) continue; const publishOriginalBranchName: boolean = branchObject.aliasObject.publishOriginalBranchName; @@ -151,7 +153,7 @@ export const getDeployableJobs = async ( directory ); - if (!aliases || aliases.length === 0) { + if (!aliases || aliases.length) { if (non_versioned) { newPayload.urlSlug = ''; } diff --git a/src/repositories/repoBranchesRepository.ts b/src/repositories/repoBranchesRepository.ts index f0474ae14..7673d1209 100644 --- a/src/repositories/repoBranchesRepository.ts +++ b/src/repositories/repoBranchesRepository.ts @@ -52,7 +52,7 @@ export class RepoBranchesRepository extends BaseRepository { { $project: { branches: 1 } }, ]) .toArray(); - + console.log(JSON.stringify(aliasArray)); if (aliasArray.length === 1) { returnObject['aliasObject'] = aliasArray[0].branches; returnObject.status = 'success';