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