feat(forge): pluggable forge abstraction + GitLab and Gitea/Forgejo/Codeberg (#1913)
* refactor(forge): forge-neutral foundation (GitHub-only) Decouple git-hosting from GitHub behind a neutral abstraction (issue #1616), GitHub-only for now; existing GitHub behaviour is unchanged. - Forge manifest, neutral ForgeService contract, forge registry + resolver, and a client forge-module registry. - GitHub code renamed to the neutral shape; PR/Issue attachment wording preserved. - forge.search.response enums parse tolerantly (unknown kind/auth state degrade instead of breaking the client). - createPullRequest reports typed CLI/auth errors instead of a generic message. - forge-resolver host/remote caches are LRU-bounded. - Forge host trust is explicit: only a known cloud host or a CLI-authenticated host is ever talked to; an unauthenticated GitHub Enterprise host fails resolution instead of routing to github.com. - Docs: forge-providers guide, glossary and i18n forge-copy conventions, architecture and rpc-namespacing terminology. - Vitest React Native mocks (unistyles, svg, linking, lucide) consolidated into shared aliased test-stubs. * feat(forge): GitLab adapter, forge-aware UI, pipelines and approvals GitLab adapter over the glab CLI on the neutral contracts: MR status, forge-aware UI, pipeline tree, and N-of-M approvals. - threadIsResolved is part of the neutral timeline item. - Pipeline load failures show an error instead of an empty section. - Manual pipeline jobs render as pending. - Fork/detached MR head pipelines are fetched by MR iid (glab ci get --merge-request). * feat(forge): Gitea family adapter (Gitea, Forgejo, Codeberg) One adapter over the tea CLI serving Gitea, Forgejo, and Codeberg on the neutral contracts. - CI status aggregates commit statuses and Actions runs together. - Gitea's terminal "warning" state maps to failure on server and client. - Gitea Actions check details are reachable from the PR pane by workflowRunId. * refactor(forge): localize compatibility handling * test(forge): expect normalized GitLab facts --------- Co-authored-by: Mohamed Boudra <boudra.moha@gmail.com>
This commit is contained in:
co-authored by
Mohamed Boudra
parent
04d1ebdce0
commit
a8ebd390fa
@@ -102,6 +102,7 @@ export const zhCN: TranslationResources = {
|
||||
addImage: "添加图片",
|
||||
addFile: "Upload file",
|
||||
addIssueOrPr: "添加 issue 或 PR",
|
||||
addIssueOrPr_mr: "添加 issue 或 MR",
|
||||
dropImagesHere: "将图片拖放到这里",
|
||||
dropFilesHere: "Drop files here",
|
||||
editQueuedMessage: "编辑排队消息",
|
||||
@@ -109,8 +110,8 @@ export const zhCN: TranslationResources = {
|
||||
openImage: "打开图片附件",
|
||||
removeImage: "移除图片附件",
|
||||
removeFile: "Remove file attachment",
|
||||
openGithub: "打开 {{kind}} #{{number}}",
|
||||
removeGithub: "移除 {{kind}} #{{number}}",
|
||||
openGithub: "打开 {{kind}} {{number}}",
|
||||
removeGithub: "移除 {{kind}} {{number}}",
|
||||
element: "元素",
|
||||
openBrowserElement: "打开浏览器元素附件",
|
||||
removeBrowserElement: "移除浏览器元素附件",
|
||||
@@ -134,7 +135,9 @@ export const zhCN: TranslationResources = {
|
||||
searching: "正在搜索...",
|
||||
noResults: "没有结果。",
|
||||
searchPlaceholder: "搜索 issues 和 PRs...",
|
||||
searchPlaceholder_mr: "搜索 issues 和 MRs...",
|
||||
title: "附加 issue 或 PR",
|
||||
title_mr: "附加 issue 或 MR",
|
||||
},
|
||||
},
|
||||
agentControls: {
|
||||
@@ -616,6 +619,9 @@ export const zhCN: TranslationResources = {
|
||||
label: "创建 PR",
|
||||
pending: "正在创建 PR...",
|
||||
success: "PR 已创建",
|
||||
label_mr: "创建 MR",
|
||||
pending_mr: "正在创建 MR...",
|
||||
success_mr: "MR 已创建",
|
||||
},
|
||||
mergeBranch: {
|
||||
label: "本地 merge",
|
||||
@@ -638,7 +644,13 @@ export const zhCN: TranslationResources = {
|
||||
rebase: "Merge PR (rebase)",
|
||||
pending: "正在 merge PR...",
|
||||
success: "PR 已 merge",
|
||||
squash_mr: "Merge MR (squash)",
|
||||
merge_mr: "Merge MR (merge)",
|
||||
rebase_mr: "Merge MR (rebase)",
|
||||
pending_mr: "正在 merge MR...",
|
||||
success_mr: "MR 已 merge",
|
||||
},
|
||||
viewPr_mr: "查看 MR",
|
||||
autoMerge: {
|
||||
enableSquash: "Auto merge (squash)",
|
||||
enableMerge: "Auto merge (merge)",
|
||||
@@ -649,7 +661,7 @@ export const zhCN: TranslationResources = {
|
||||
disabled: "Auto-merge 已禁用",
|
||||
},
|
||||
unavailable: {
|
||||
viewPrNoGithub: "当前无法查看 PR,因为 GitHub 未连接",
|
||||
viewPrNoForge: "当前无法查看 {{noun}},因为 {{brand}} 未连接",
|
||||
pullNoRemote: "此处无法 pull,因为此分支尚未连接到 remote",
|
||||
pullDirty: "有本地变更时无法 pull,请先 commit 或 stash",
|
||||
pullUpToDate: "无法 pull,因为此分支已是最新",
|
||||
@@ -658,8 +670,10 @@ export const zhCN: TranslationResources = {
|
||||
pushNothing: "无法 push,因为没有新的内容可发送",
|
||||
pullAndPushNoRemote: "此处无法 pull 并 push,因为此分支尚未连接到 remote",
|
||||
pullAndPushDirty: "有本地变更时无法 pull 并 push,请先 commit 或 stash",
|
||||
pullAndPushNoIncoming: "无法 pull 并 push,因为没有需要先 pull 的传入变更",
|
||||
pullAndPushInSync: "无法 pull 并 push,因为此分支已同步",
|
||||
createPrNoGithub: "当前无法创建 PR,因为 GitHub 未连接",
|
||||
pullAndPushNothingToPush: "无法 pull 并 push,因为 pull 之后没有新的内容可发送",
|
||||
createPrNoForge: "当前无法创建 {{noun}},因为 {{brand}} 未连接",
|
||||
createPrNoCommits: "无法创建 PR,因为此分支还没有新的 commit",
|
||||
mergeNoBase: "无法 merge,因为无法确定 base branch",
|
||||
mergeDirty: "有本地变更时无法 merge,请先 commit 或 stash",
|
||||
@@ -668,13 +682,15 @@ export const zhCN: TranslationResources = {
|
||||
updateDirty: "有本地变更时无法更新,请先 commit 或 stash",
|
||||
updateCurrent: "无法更新,因为此分支已与 {{baseRef}} 保持最新",
|
||||
mergePrNoGithub: "当前无法 merge PR,因为 GitHub 未连接",
|
||||
archiveNotWorktree: "此处无法归档,因为此 workspace 不是作为 Paseo worktree 创建的",
|
||||
mergePrNoForge: "当前无法 merge {{noun}},因为 {{brand}} 未连接",
|
||||
mergePrMissing: "无法 merge PR,因为还没有 pull request",
|
||||
mergePrDraft: "无法 merge PR,因为 pull request 仍是 draft",
|
||||
mergePrMerged: "无法 merge PR,因为 pull request 已 merge",
|
||||
mergePrClosed: "无法 merge PR,因为 pull request 已关闭",
|
||||
mergePrConflicts: "无法 merge PR,因为 pull request 存在冲突",
|
||||
mergePrQueue: "此处无法 merge PR,因为此 repository 使用 merge queue",
|
||||
mergePrNotReady: "GitHub 报告 pull request 可 merge 后才能 merge PR",
|
||||
mergePrNotReady: "{{brand}} 报告 {{noun}} 可 merge 后才能 merge {{noun}}",
|
||||
autoMergeCannotDisable: "Auto-merge 已启用,但此账号无法禁用",
|
||||
},
|
||||
toasts: {
|
||||
@@ -724,7 +740,7 @@ export const zhCN: TranslationResources = {
|
||||
expandAllFolders: "展开所有文件夹",
|
||||
refreshing: "正在刷新",
|
||||
refresh: "刷新",
|
||||
refreshState: "刷新 git 和 GitHub 状态",
|
||||
refreshState: "刷新 git 和 {{brand}} 状态",
|
||||
failedRefresh: "刷新 git 状态失败。",
|
||||
emptyHiddenWhitespace: "隐藏空白差异后没有可见变更",
|
||||
emptyUncommitted: "没有未 commit 的变更",
|
||||
@@ -760,13 +776,23 @@ export const zhCN: TranslationResources = {
|
||||
pr: {
|
||||
actions: {
|
||||
viewPullRequest: "查看",
|
||||
openOn: "在 {{brand}} 上打开",
|
||||
},
|
||||
sections: {
|
||||
checks: "Checks",
|
||||
pipeline: "流水线",
|
||||
reviews: "Reviews",
|
||||
},
|
||||
empty: {
|
||||
noJobs: "无作业",
|
||||
loadingPipeline: "正在加载流水线...",
|
||||
pipelineJobsLoadFailed: "无法加载流水线作业",
|
||||
allowedToFail: "允许失败",
|
||||
},
|
||||
approvals: "{{given}} / {{required}} 批准",
|
||||
accessibility: {
|
||||
pullRequest: "Pull request #{{number}}",
|
||||
pullRequest_mr: "合并请求 !{{number}}",
|
||||
},
|
||||
states: {
|
||||
draft: "Draft",
|
||||
@@ -783,11 +809,19 @@ export const zhCN: TranslationResources = {
|
||||
time: {
|
||||
justNow: "刚刚",
|
||||
},
|
||||
thread: {
|
||||
discussion: "讨论主题",
|
||||
},
|
||||
errors: {
|
||||
statusLoadFailed: "无法加载 Pull Request 状态",
|
||||
activityLoadFailed: "无法加载 Pull Request 活动",
|
||||
},
|
||||
},
|
||||
forgeSetup: {
|
||||
installCli: "安装 {{cli}} CLI 以使用 {{brand}} 功能。",
|
||||
signIn: "运行 {{command}} 以使用 {{brand}} 功能。",
|
||||
generic: "在此主机上设置 {{brand}} 以使用其功能。",
|
||||
},
|
||||
},
|
||||
},
|
||||
sidebar: {
|
||||
@@ -916,9 +950,9 @@ export const zhCN: TranslationResources = {
|
||||
refPicker: {
|
||||
startingRef: "起始 ref",
|
||||
chooseStart: "选择起始位置",
|
||||
checkoutHint: "Checkout PR #{{number}}?",
|
||||
checkoutPr: "Checkout PR #{{number}}",
|
||||
dismissCheckoutHint: "忽略 PR #{{number}} checkout 提示",
|
||||
checkoutHint: "Checkout {{noun}} {{numberPrefix}}{{number}}?",
|
||||
checkoutPr: "Checkout {{noun}} {{numberPrefix}}{{number}}",
|
||||
dismissCheckoutHint: "忽略 {{noun}} {{numberPrefix}}{{number}} checkout 提示",
|
||||
intoBase: "进入 {{baseRef}}",
|
||||
searching: "正在搜索...",
|
||||
noMatchingRefs: "没有匹配的 refs。",
|
||||
|
||||
Reference in New Issue
Block a user