Skip to content

Commit

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

0 comments on commit 7318016

Please sign in to comment.