Skip to content

Commit

Permalink
fix: data reversing is not necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
wassimk committed Jun 3, 2024
1 parent e816d74 commit f5d779b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ async function run() {
repo,
pull_number
})
console.log(`prReviews: ${JSON.stringify(prReviews.data.reverse(), undefined, 2)}`)
console.log(`prReviews: ${JSON.stringify(prReviews, undefined, 2)}`)

let reviews = []
let filteredPrReviews = prReviews.data.reverse().filter(review => review.state !== "COMMENTED");
let filteredPrReviews = prReviews.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 f5d779b

Please sign in to comment.