Skip to content

Commit

Permalink
wrong place for the filter
Browse files Browse the repository at this point in the history
  • Loading branch information
leopic committed Aug 12, 2024
1 parent 1b7abe8 commit 9071152
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/actions/time-to-first-review/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@ try {
const prs = await fetchPullRequests(repo, token, maxPRs);

let timesToFirstReview = await Promise.all(
prs.map((pr) => getTimeToFirstReview(pr, repo, token))
).filter((time) => time);
prs
.map((pr) => getTimeToFirstReview(pr, repo, token))
.filter((time) => time)
);

if (timesToFirstReview.length > 0) {
const total = timesToFirstReview.reduce((sum, value) => sum + value, 0);
Expand Down

0 comments on commit 9071152

Please sign in to comment.