Skip to content

Commit

Permalink
Handle multiple PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
pathawks committed Jul 14, 2018
1 parent 63ab3fb commit 3c838b4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions aws/lambda/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ exports.handler = async function(event, context) {
return;
}

const pull_request = pull_requests[0];

const message = enqueuePullRequest(pull_request, INSTALLATION);
response.body = JSON.stringify(message, null, 2);
for (pull_request in pull_requests) {
const message = enqueuePullRequest(pull_request, INSTALLATION);
response.body += JSON.stringify(message, null, 2) + "\n\n";
}

await new Promise((resolve, reject) => {
ec2.startInstances(PARAMS, function(err, data) {
Expand Down

0 comments on commit 3c838b4

Please sign in to comment.