Skip to content

Commit

Permalink
DOP-4599 logging
Browse files Browse the repository at this point in the history
  • Loading branch information
anabellabuckvar committed May 23, 2024
1 parent 0b608ac commit 685fff4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion api/controllers/v1/slack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ async function deployRepo(deployable: Array<any>, logger: ILogger, jobRepository

// Used solely for adding parallel deploy jobs to another array
const deployHelper = (deployable, payload, jobTitle, jobUserName, jobUserEmail) => {
console.log('inside deploy helper!');
deployable.push(createJob({ ...payload }, jobTitle, jobUserName, jobUserEmail));
};

Expand Down Expand Up @@ -124,6 +125,7 @@ export const getDeployableJobs = async (
const non_versioned = repoInfo.branches.length === 1;

const branchObject = await repoBranchesRepository.getRepoBranchAliases(repoName, branchName, repoInfo.project);
console.log(JSON.stringify(branchObject));
if (!branchObject?.aliasObject) continue;

const publishOriginalBranchName: boolean = branchObject.aliasObject.publishOriginalBranchName;
Expand Down Expand Up @@ -151,7 +153,7 @@ export const getDeployableJobs = async (
directory
);

if (!aliases || aliases.length === 0) {
if (!aliases || aliases.length) {
if (non_versioned) {
newPayload.urlSlug = '';
}
Expand Down
2 changes: 1 addition & 1 deletion src/repositories/repoBranchesRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export class RepoBranchesRepository extends BaseRepository {
{ $project: { branches: 1 } },
])
.toArray();

console.log(JSON.stringify(aliasArray));
if (aliasArray.length === 1) {
returnObject['aliasObject'] = aliasArray[0].branches;
returnObject.status = 'success';
Expand Down

0 comments on commit 685fff4

Please sign in to comment.