Skip to content

Commit

Permalink
wip: reverse the data in the log output
Browse files Browse the repository at this point in the history
  • Loading branch information
wassimk committed Jun 3, 2024
1 parent ff3b2c7 commit 1126619
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 1126619

Please sign in to comment.