Skip to content

Commit

Permalink
DOP-4274 nits and preprd testing
Browse files Browse the repository at this point in the history
  • Loading branch information
anabellabuckvar committed Jan 23, 2024
1 parent e03def7 commit bf47de1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 16 deletions.
1 change: 1 addition & 0 deletions .github/workflows/deploy-stg-ecs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
branches:
- "master"
- "integration"
- "DOP-4274"
concurrency:
group: environment-stg-${{ github.ref }}
cancel-in-progress: true
Expand Down
22 changes: 10 additions & 12 deletions api/handlers/slack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,16 @@ 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);
}
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
7 changes: 3 additions & 4 deletions src/services/slack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,9 @@ export class SlackConnector implements ISlackConnector {
branches.forEach((fullPath) => {
const displayBranchPath = fullPath;
let valueBranchPath = fullPath;
const inactiveStr = /!inactive/gi;
const isInactive = fullPath.search(inactiveStr);
if (isInactive != -1) {
valueBranchPath = fullPath.slice(10);
const isInactive = fullPath.startsWith('(!inactiveStr)');
if (isInactive == true) {
valueBranchPath = fullPath.slice(12);
}
const opt = {
text: {
Expand Down

0 comments on commit bf47de1

Please sign in to comment.