Skip to content

Commit

Permalink
fix(github-actions): properly spread the requested_teams values for p…
Browse files Browse the repository at this point in the history
…ending reviews

Previously the requested_teams was not spread resulting in an array like [[]] instead of
[] when no reviews are pending.
  • Loading branch information
josephperrott committed May 12, 2022
1 parent 751c9c0 commit 02239df
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 @@ -43,7 +43,7 @@ async function run(): Promise<void> {
return;
}

if ([...pr.requested_reviewers, pr.requested_teams].length > 0) {
if ([...pr.requested_reviewers, ...pr.requested_teams].length > 0) {
core.info('Skipping check as there are still pending reviews.');
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 @@ -15279,7 +15279,7 @@ async function run() {
core.info("PR author is a googler, skipping as post approval changes are allowed.");
return;
}
if ([...pr.requested_reviewers, pr.requested_teams].length > 0) {
if ([...pr.requested_reviewers, ...pr.requested_teams].length > 0) {
core.info("Skipping check as there are still pending reviews.");
return;
}
Expand Down

0 comments on commit 02239df

Please sign in to comment.