From 3201e09e0bf9d1e75cbfd58acbe3ea70e7742c43 Mon Sep 17 00:00:00 2001 From: Anabella Buckvar Date: Thu, 18 Jan 2024 12:10:24 -0500 Subject: [PATCH] DOP-4724 revert testing --- api/handlers/slack.ts | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/api/handlers/slack.ts b/api/handlers/slack.ts index 320503789..483a4db62 100644 --- a/api/handlers/slack.ts +++ b/api/handlers/slack.ts @@ -24,15 +24,18 @@ export async function buildEntitledBranchList(entitlement: any, repoBranchesRepo const [repoOwner, repoName, directoryPath] = repo.split('/'); const branches = await repoBranchesRepository.getRepoBranches(repoName, directoryPath); for (const branch of branches) { - if ('buildWithSnooty' in branch && branch['buildsWithSnooty']) { - const active = branch['active']; - const repoPath = `${repoOwner}/${repoName}${directoryPath ? '/' + directoryPath : ''}/${ - branch['gitBranchName'] - }`; - if (!active) { - entitledBranches.push(`!inactive ` + `${repoPath}`); - } else { - entitledBranches.push(repoPath); + if ('buildsWithSnooty' in branch) { + const buildWithSnooty = branch['buildsWithSnooty']; + if (buildWithSnooty) { + const active = branch['active']; + const repoPath = `${repoOwner}/${repoName}${directoryPath ? '/' + directoryPath : ''}/${ + branch['gitBranchName'] + }`; + if (!active) { + entitledBranches.push(`!inactive ` + `${repoPath}`); + } else { + entitledBranches.push(repoPath); + } } } }