Skip to content

Commit

Permalink
DOP-4724 revert testing
Browse files Browse the repository at this point in the history
  • Loading branch information
anabellabuckvar committed Jan 18, 2024
1 parent 69e3c94 commit 3201e09
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions api/handlers/slack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
}
Expand Down

0 comments on commit 3201e09

Please sign in to comment.