Skip to content

Commit c14f45d

Browse files
committed
fix: temporal build issues
Signed-off-by: Yeganathan S <63534555+skwowet@users.noreply.github.com>
1 parent f9a3d39 commit c14f45d

3 files changed

Lines changed: 6 additions & 7 deletions

File tree

services/apps/merge_suggestions_worker/src/enums.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,8 @@ export const EMAIL_AS_USERNAME_PLATFORMS = [
1414
PlatformType.CONFLUENCE,
1515
PlatformType.GERRIT,
1616
]
17+
18+
export const noreplyEmailProviders = {
19+
github: '@users.noreply.github.com',
20+
gitlab: '@users.noreply.gitlab.com',
21+
} as const

services/apps/merge_suggestions_worker/src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { EMAIL_AS_USERNAME_PLATFORMS } from './enums'
44

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

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

services/libs/common/src/email.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,6 @@ export const parseGitLabNoreplyEmail = (email?: string | null): string | null =>
4343
return username || null
4444
}
4545

46-
/** Returns true if the value is a provider-generated noreply address. */
47-
export const isNoreplyEmail = (value: string): boolean => {
48-
const lower = value.toLowerCase()
49-
return Object.values(noreplyEmailProviders).some((s) => lower.endsWith(s))
50-
}
51-
5246
/**
5347
* Returns true if the email host indicates a local machine (not a real mail server).
5448
* Git commits from unconfigured machines often produce addresses like user@hostname.local.

0 commit comments

Comments
 (0)