Files
HomeAgent/.github
commondev a7331251ab refactor(ci): 批4b 清理 CI/镜像链路旧仓名,并加 gitcode 目标仓前置检查
改名 HomeAgent → HologramAgent 后,CI 里仍写死旧仓库路径,且镜像链路
一旦目标仓缺失只会得到 git 的原始报错,看不出「仓没建」。

改动:
- ci.yml: sync-gitcode-main 推 main 目标改为 JianFeeeee/HologramAgent,
  并在 push 前新增「前置检查 gitcode 目标仓是否存在」独立 step。
- release.yml: sync-gitcode 的 push / releases API / GITCODE_REPO 统一
  走 GC_REPO=JianFeeeee/HologramAgent 变量;同样新增前置检查 step。

前置检查语义:
- GITCODE_TOKEN 未配置 → 沿用既有「跳过镜像同步」(可选项,不算错误);
- token 有但目标仓不存在 → 打印要建的仓与地址,exit 1 硬失败;
- 探测与 push 用同一 URL、同一凭据(git ls-remote),贴近真实失败面;
- 日志对 URL userinfo 做结构脱敏,避免 token 被 git 报错带出。

gitcode 报错文本按 2026-10 实测校准:目标仓不存在时返回
  remote: <CH...> The project you were looking for could not be found.
  fatal: ... The requested URL returned error: 403
是 "could not be found" + 403,不是 GitHub 那种 404 / Repository not found,
故分类同时匹配这两种形态(401/403 单列一支,提示仓未建或 token 无权限)。

未执行任何线上动作:不重命名 GitHub 仓、不建 gitcode 镜像仓、不 push/开 PR/打 tag。
2026-10-21 18:11:59 +08:00
..