Ignore COMMENT review state when computing whether to move a PR to IN TEST

This commit is contained in:
Pedro Pombeiro 2018-01-24 11:41:15 +01:00
parent 038944f361
commit 86c17d5426
No known key found for this signature in database
GPG Key ID: A65DEB11E4BBC647

View File

@ -40,7 +40,13 @@ async function getReviewApprovalState(github, robot, repo, pullRequest) {
github.pullRequests.getReviews({owner: ownerName, repo: repoName, number: prNumber}),
res => res.data)
for (var review of ghreviews) {
finalReviewsMap.set(review.user.id, review.state)
switch (review.state) {
case 'APPROVED':
case 'CHANGES_REQUESTED':
case 'PENDING':
finalReviewsMap.set(review.user.id, review.state)
break
}
}
var finalReviews = Array.from(finalReviewsMap.values())
if (process.env.DRY_RUN_PR_TO_TEST) {