Skip to content

Commit 575547e

Browse files
committed
fix: add 'user' and 'guest' to placeholder name blocklist to prevent false merges (CM-1137)
Signed-off-by: Yeganathan S <63534555+skwowet@users.noreply.github.com>
1 parent 5056f4d commit 575547e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • services/apps/merge_suggestions_worker/src

services/apps/merge_suggestions_worker/src/utils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ export function stripProtocol(value: string) {
4848
return value.replace(/^https?:\/\//, '')
4949
}
5050

51-
const OS_RESERVED_NAMES = new Set(['unknown', 'root', 'ubuntu', 'admin'])
51+
// Generic git user.name placeholders and OS account names that are never a real human
52+
// identity — shared across unrelated machines and meaningless as a merge signal.
53+
const OS_RESERVED_NAMES = new Set(['unknown', 'root', 'ubuntu', 'admin', 'user', 'guest'])
5254

53-
// OS-level account names that are never a real human identity — shared across
54-
// thousands of unrelated machines and meaningless as a merge signal.
5555
export function isOsReservedName(name: string): boolean {
5656
return OS_RESERVED_NAMES.has(name.trim().toLowerCase())
5757
}

0 commit comments

Comments
 (0)