Skip to content

Commit

Permalink
DOP-4599 fix entitledbranches building
Browse files Browse the repository at this point in the history
  • Loading branch information
anabellabuckvar committed May 10, 2024
1 parent 1c2b892 commit ea820e1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions api/handlers/slack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function prepResponse(statusCode, contentType, body) {

//if person is admin, get all prod deployable repos
export async function buildEntitledGroupsList(entitledRepos: any, repoBranchesRepository: RepoBranchesRepository) {
const entitledBranches: string[] = [];
const entitledBranches: any[] = [];
for (const repo of entitledRepos) {
const [repoOwner, repoName, directoryPath] = repo.split('/');
const branches = await repoBranchesRepository.getRepoBranches(repoName, directoryPath);
Expand Down Expand Up @@ -62,10 +62,10 @@ export async function buildEntitledGroupsList(entitledRepos: any, repoBranchesRe
.localeCompare(branchOne.text.text.toString().replace(/\d+/g, (n) => +n + 100000))
),
};
repoOptions.push(repoOption);
entitledBranches.push(repoOption);
}
}
return repoOptions.sort((repoOne, repoTwo) => repoOne.label.text.localeCompare(repoTwo.label.text));
return entitledBranches.sort((repoOne, repoTwo) => repoOne.label.text.localeCompare(repoTwo.label.text));
}

export function getQSString(qs: string) {
Expand Down

0 comments on commit ea820e1

Please sign in to comment.