fix: harden conflict resolution pipeline

This commit is contained in:
lezi-fun committed 2026-08-14 14:18:42 +08:00
1 parent decf7ab8b4
commit 351d3148aa
9 files changed
+273 -55

No files matched your search

+8
View File
@@ -0,0 +1,8 @@
export function formatBotDisplayName(value: string | undefined): string {
const trimmed = value?.trim().replace(/^@/, "");
if (!trimmed || trimmed.toLowerCase() === "ghbot") {
return "goose";
}
const botLogin = /^(.*?)\[bot\]$/i.exec(trimmed);
return botLogin?.[1]?.trim() ? `${botLogin[1].trim()} bot` : trimmed;
}