Skip to content

Commit 12e38ba

Browse files
committed
fix(ng-dev): properly account for not included in list (#2322)
Properly handle a "not in" clause in pullapprove. PR Close #2322
1 parent dc94a5f commit 12e38ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ng-dev/pullapprove/condition_evaluator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export function convertConditionToFunction(
8181
*/
8282
function transformExpressionToJs(expression: string): string {
8383
return expression
84-
.replace(/^(.+)\s+not in\s+(\[.+\])$/, '!$2.some(x => $1.matchesAny || $1 == x)')
84+
.replace(/^(.+)\s+not in\s+(\[.+\])$/, '!$2.includes($1)')
8585
.replace(/^(.+)\s+in\s+(.+)$/, '$2.some(x => $1.matchesAny || $1 == x)')
8686
.replace(/^(.+)\s+not in\s+(.+)$/, '!$2.includes($1)')
8787
.replace(/^(.+)\s+in\s+(.+)$/, '$2.includes($1)')

0 commit comments

Comments
 (0)