✨ feat(vscode): 设置和看板按仓库类型区分 GitHub 与 Gitea,GitHub 显示 gh 登录状态,文案去 Gitea 化

This commit is contained in:
cruldra committed 2026-10-19 08:25:10 +11:00
1 parent ac3c882672
commit ae06c8e5d1
42 files changed
+443 -195

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
import type { Issue } from '../types'
import { FORGE_NAMES, forgeKindForHost } from '../../../src/forge/types'
/** 工单所在系统的名字,用在「在 GitHub 打开」这类文案里;代码托管工单看网页地址的 host 认是哪一家。 */
export function trackerName(issue: Pick<Issue, 'source' | 'htmlUrl'>): string {
if (issue.source === 'youtrack')
return 'YouTrack'
let host = ''
try {
host = new URL(issue.htmlUrl).host
}
catch {}
return FORGE_NAMES[forgeKindForHost(host)]
}