Skip to content

Commit 496514c

Browse files
committed
fix: use noreplyEmailProviders from enums in isNoreplyEmail to avoid duplication (CM-1137)
Signed-off-by: Yeganathan S <63534555+skwowet@users.noreply.github.com>
1 parent edefa7c commit 496514c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • services/apps/merge_suggestions_worker/src

services/apps/merge_suggestions_worker/src/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { ILLMConsumableMember, PlatformType } from '@crowd/types'
22

3-
import { EMAIL_AS_USERNAME_PLATFORMS } from './enums'
3+
import { EMAIL_AS_USERNAME_PLATFORMS, noreplyEmailProviders } from './enums'
44

55
function isNoreplyEmail(value: string): boolean {
66
const lower = value.toLowerCase()
7-
return ['@users.noreply.github.com', '@users.noreply.gitlab.com'].some((s) => lower.endsWith(s))
7+
return Object.values(noreplyEmailProviders).some((s) => lower.endsWith(s))
88
}
99

1010
export const prefixLength = (string: string) => {

0 commit comments

Comments
 (0)