Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Commit

Permalink
less jmp
Browse files Browse the repository at this point in the history
  • Loading branch information
joao-paulo-parity committed Apr 26, 2022
1 parent f2a529d commit 6e770b7
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -528,11 +528,8 @@ export const runChecks = async ({ pr, ...ctx }: Context & { pr: PR }) => {
const approvedBy: Set<string> = new Set()

for (const review of latestReviews.values()) {
if (!review.isApproval) {
continue
}

if (
review.isApproval &&
rule.subconditions.find(({ usersInfo }) => {
return usersInfo.has(review.user)
})
Expand Down Expand Up @@ -846,11 +843,10 @@ export const runChecks = async ({ pr, ...ctx }: Context & { pr: PR }) => {
const approvedBy: Set<string> = new Set()

for (const review of latestReviews.values()) {
if (!review.isApproval) {
continue
}

if (subcondition.usersInfo.has(review.user)) {
if (
review.isApproval &&
subcondition.usersInfo.has(review.user)
) {
approvedBy.add(review.user)
}
}
Expand Down

0 comments on commit 6e770b7

Please sign in to comment.