Skip to content

Commit

Permalink
fix(github-actions): use find instead of filter to allow a boolean ch…
Browse files Browse the repository at this point in the history
…eck for non-approved reviews
  • Loading branch information
josephperrott committed May 12, 2022
1 parent 438ba57 commit c9f0e5d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion github-actions/post-approval-changes/lib/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ async function run(): Promise<void> {
return;
}

if (reviews.filter((review) => review.state !== 'APPROVED')) {
if (reviews.find((review) => review.state !== 'APPROVED')) {
core.info('Skipping check as there are still non-approved review states.');
return;
}
Expand Down
2 changes: 1 addition & 1 deletion github-actions/post-approval-changes/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -15303,7 +15303,7 @@ async function run() {
core.info("Skipping check as their are no reviews on the pull request.");
return;
}
if (reviews.filter((review) => review.state !== "APPROVED")) {
if (reviews.find((review) => review.state !== "APPROVED")) {
core.info("Skipping check as there are still non-approved review states.");
return;
}
Expand Down

0 comments on commit c9f0e5d

Please sign in to comment.