Skip to content

Commit

Permalink
DOP-4414 checking main
Browse files Browse the repository at this point in the history
  • Loading branch information
anabellabuckvar committed Mar 18, 2024
1 parent 635025b commit 98c4a15
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions api/controllers/v2/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,22 +174,14 @@ export const triggerSmokeTestAutomatedBuild = async (event: APIGatewayEvent): Pr
' completed successfully but only Deploy Staging ECS workflow completion will trigger smoke test site deployments',
};

return {
statusCode: 202,
headers: { 'Content-Type': 'text/plain' },
body:
'Build on branch' +
body.workflow_run.head_branch +
' will not trigger site deployments as it was not on master branch in upstream repo',
};
// if the build was not building master, no need for smoke test sites
if (body.workflow_run.head_branch != 'main' || body.repository.fork) {
console.log('Build was not on master branch in main repo, sites will not deploy as no smoke tests are needed');
return {
statusCode: 202,
headers: { 'Content-Type': 'text/plain' },
body:
'Build on branch' +
'Build on branch ' +
body.workflow_run.head_branch +
' will not trigger site deployments as it was not on master branch in upstream repo',
};
Expand Down

0 comments on commit 98c4a15

Please sign in to comment.