dev-manager-tauri/.blueprint/modules/github-publish.md
lanrtop 289b558278 refactor(github): GitHub 全面退役——免登录 + 发布/导入/同步链路移除 + 凭据去 GitHub 化
D1 免登录改造:App 启动直接进主界面,删 LoginPage/github.rs/OAuth 全套命令、
   Sidebar 账户区与 GitHub OAuth 设置弹窗、健康检查 GitHub Token 项
D2 移除发布/导入/PR/CI 入口:删 PublishModal/ImportRepoModal、ProjectCard 的
   PR compare 链接与 Actions 状态灯、RepoRegistryModal 同步 tab、CicdModal runs tab、
   publish.rs 的 github_create_repo/git_push_to_github
D3 spacesSync 单机化:删 spacesSync/useSpacesSync/SpacesPage/DiscoveryPanel,
   拆除 App→Dashboard→ProjectCard 的 spacesJson 链
D4 git_ops 凭据链重写:ssh agent → git credential helper → gitea_instances token
   前缀匹配 → default,不再依赖 github_token

保留:server_software GitHub 镜像(Releases 下载加速)、gitea_migrate 迁移入口、
cicd.rs(待 Gitea Actions 改造卡);DB 表不删(R05 migration 兼容)

顺带:修复 servers.rs 两个存量测试的 schema 漂移(测试建表缺 deploy_type 列);
      包含会话前未提交的 agent-infra F3(get_agent_health 健康诊断,与 lib.rs/
      commands.ts 物理耦合无法拆分提交)

验证:cargo test 53 passed / typecheck 全绿 / vitest passWithNoTests
2026-07-02 13:15:56 +09:00

1010 B
Raw Blame History

GitHub 发布

❄️ 已冻结2026-06-19:全面统一自建 Gitea弃用 GitHub。 🗑️ 已退役2026-07-02发布链路代码全部移除PublishModal / ImportRepoModal / github_create_repo / git_push_to_github详见 github-decommission 模块。本文件仅作历史记录。

在炼境内通过 GitHub OAuth 直接将本地项目推送到远程仓库,支持新建仓库或关联已有仓库,完成发布后自动回填 remote URL。

决策记录

  • 依赖 github-auth 模块提供的 access token不在本模块持久化凭证
  • 发布操作调用 GitHub REST API 创建仓库,然后通过 git2 库执行 push

任务卡

GitHub 仓库创建与推送

  • status: done
  • complexity: M
  • files: src-tauri/src/commands/github.rs, src/components/dashboard/ProjectCard.tsx
  • depends: github-auth
  • acceptance: 未关联远程的项目可在看板卡片中一键发布到 GitHub发布成功后 remote_url 写入 DB卡片显示 GitHub 链接