Skip to content

Commit

Permalink
fix: reverse the order on filtered
Browse files Browse the repository at this point in the history
  • Loading branch information
wassimk committed Jun 3, 2024
1 parent ecc2e8c commit 04015e0
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 @@ -27,10 +27,10 @@ async function run() {
console.log(`prReviews: ${JSON.stringify(prReviews.data.reverse(), undefined, 2)}`)

let reviews = []
let filteredPrReviews = prReviews.data.reverse().filter(review => review.state !== "COMMENTED");
let filteredPrReviews = prReviews.data.filter(review => review.state !== "COMMENTED");
console.log(`filteredPrReviews: ${JSON.stringify(filteredPrReviews, undefined, 2)}`)

filteredPrReviews.forEach(review => {
filteredPrReviews.reverse().forEach(review => {
const reviewer = review.user.login
if (!reviews.find(r => r.reviewer === reviewer)) {
if (!requestedReviewers.includes(reviewer)) {
Expand Down

0 comments on commit 04015e0

Please sign in to comment.