diff --git a/src/main.js b/src/main.js index df0fbeb..bd00a58 100644 --- a/src/main.js +++ b/src/main.js @@ -24,10 +24,12 @@ async function run() { repo, pull_number }) - console.log(`prReviews: ${JSON.stringify(prReviews.data, undefined, 2)}`) + console.log(`prReviews: ${JSON.stringify(prReviews.data.reverse(), undefined, 2)}`) let reviews = [] - let filteredPrReviews = prReviews.data.filter(review => review.state !== "COMMENTED"); + let filteredPrReviews = prReviews.data.reverse().filter(review => review.state !== "COMMENTED"); + console.log(`filteredPrReviews: ${JSON.stringify(filteredPrReviews, undefined, 2)}`) + filteredPrReviews.forEach(review => { const reviewer = review.user.login if (!reviews.find(r => r.reviewer === reviewer)) {