Skip to content

Commit

Permalink
Try with async/await
Browse files Browse the repository at this point in the history
  • Loading branch information
lbianchi-lbl committed Nov 26, 2020
1 parent 21e2ef8 commit 3a3586d
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/pr-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,15 @@ jobs:
return Object.values(latestByUser);
}
github.paginate(
const fetchedReviews = await github.paginate(
github.pulls.listReviews, {
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: pullRequest.number,
})
.then((reviews) => {
const fetchedReviews = reviews;
}
);
.then(
reviews => reviews
);
const countFetched = fetchedReviews.length;
const latestFetched = fetchedReviews[fetchedReviews.length - 1];
Expand Down

0 comments on commit 3a3586d

Please sign in to comment.