Skip to content

Commit

Permalink
✨ Deploy application after RA creation
Browse files Browse the repository at this point in the history
  • Loading branch information
mickaelalibert committed Mar 17, 2023
1 parent 6cbf74d commit 53039a5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions build/controllers/github.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ async function pullRequestOpenedWebhook(request) {
const payload = request.payload;
const repository = payload.pull_request.head.repo.name;
const prId = payload.number;
const ref = payload.pull_request.head.ref;
const reviewApps = repositoryToScalingoAppsReview[repository];

const { shouldContinue, message } = _handleNoRACase(request);
Expand All @@ -67,6 +68,7 @@ async function pullRequestOpenedWebhook(request) {
for (const appName of reviewApps) {
const { app_name: reviewAppName } = await client.deployReviewApp(appName, prId);
await client.disableAutoDeploy(reviewAppName);
await client.deployUsingSCM(reviewAppName, ref);
}
await addMessageToPullRequest({
repositoryName: repository,
Expand Down

0 comments on commit 53039a5

Please sign in to comment.