Skip to content

Commit

Permalink
DOP-4724 cleaning up
Browse files Browse the repository at this point in the history
  • Loading branch information
anabellabuckvar committed Jan 18, 2024
1 parent 6a62ff7 commit 69e3c94
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
21 changes: 9 additions & 12 deletions api/handlers/slack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,15 @@ 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 ('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);
}
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);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/services/slack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export class SlackConnector implements ISlackConnector {
action_id: 'repo_option',
placeholder: {
type: 'plain_text',
text: 'deploy',
text: 'Select a repo to deploy',
emoji: true,
},
options: repos,
Expand Down

0 comments on commit 69e3c94

Please sign in to comment.