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

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
  • Loading branch information
joao-paulo-parity committed Apr 26, 2022
1 parent 0b745d7 commit 9a7e9b0
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,13 @@ const processSubconditionMissingApprovers = (
userToAskForReview = userInfo
} else if (userInfo.teams === null) {
userToAskForReview.teams = null
} else if (userToAskForReview.teams !== null) {
} else if (
/*
Avoid registering a team for this user if their approval is supposed
to be requested individually
*/
userToAskForReview.teams !== null
) {
userToAskForReview.teams = new Set([
...(userToAskForReview.teams ?? []),
...(userInfo?.teams ?? []),
Expand Down Expand Up @@ -908,7 +914,13 @@ export const runChecks = async ({ pr, ...ctx }: Context & { pr: PR }) => {
userToAskForReview = userInfo
} else if (userInfo.teams === null) {
userToAskForReview.teams = null
} else if (userToAskForReview.teams !== null) {
} else if (
/*
Avoid registering a team for this user if their approval is supposed
to be requested individually
*/
userToAskForReview.teams !== null
) {
userToAskForReview.teams = new Set([
...(userToAskForReview.teams ?? []),
...(userInfo?.teams ?? []),
Expand Down

0 comments on commit 9a7e9b0

Please sign in to comment.