Skip to content

Commit

Permalink
fix: use the right variable
Browse files Browse the repository at this point in the history
  • Loading branch information
wassimk committed Jun 3, 2024
1 parent 75d84b1 commit 2abd567
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 @@ -14,6 +14,7 @@ async function run() {
repo,
pull_number
}).then((res) => {
console.log(`res: ${JSON.stringify(res, undefined, 2)}`)
requestedReviewers = res.data.users.map(u => u.login);
})

Expand All @@ -31,8 +32,7 @@ async function run() {
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 && !reviewRequests.includes(reviewer))) {

if (!reviews.find(r => r.reviewer === reviewer && !requestedReviewers.includes(reviewer))) {
reviews.push({ reviewer: reviewer, state: review.state })
}
});
Expand Down

0 comments on commit 2abd567

Please sign in to comment.