mcpField
M
monorepo-setup-git

monorepo-setup-git

github.com/editframe开发1968 次安装2 周前更新
代码仓库

关于 monorepo-setup-git

monorepo-setup-git 是一项技能,记录 Editframe 单体仓库及其相邻的 telecine 和 elements 仓库的 Git 约定。内容涵盖代码推送位置、技能同步方式,以及 CI 和部署工作流的监控方法。

主要功能

  1. 01说明相邻仓库的目录布局
  2. 02定义推送与拉取工作流
  3. 03介绍技能同步方式
  4. 04列出 CI 监控脚本
  5. 05说明 telecine 部署门禁

适用场景

  1. 01确定推送时应使用的仓库和远程端
  2. 02从单体仓库同步技能
  3. 03监控部署与发布任务

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/editframe/skills --skill monorepo-setup-git

安装后在 Claude Code 中输入/monorepo-setup-git确认已加载。

详细介绍

Monorepo Git 配置

仓库布局

telecine 和 elements 是独立的同级仓库,克隆在 monorepo 旁边:

~/Editframe/worktrees/<branch>/
  monorepo/     # primary monorepo checkout
  telecine/     # telecine repo clone
  elements/     # elements repo clone

monorepo 只有一个远程仓库:skills → [email protected]:editframe/skills.git。

telecine 和 elements 各自的 origin 都指向对应的 GitHub 仓库。

推送/拉取工作流

Telecine

直接在同级的 telecine 仓库中操作,并从那里推送到 origin:

# From ~/Editframe/worktrees/<branch>/telecine/
git push origin main           # push to telecine main
git push origin <branch>       # push a branch

切勿从 monorepo 根目录推送 telecine。

Elements

直接在同级的 elements 仓库中操作:

# From ~/Editframe/worktrees/<branch>/elements/
git push origin main
git push origin <branch>
git push origin v<version>     # push a tag to trigger release CI
Skills

通过提供的脚本从 monorepo 推送 Skills:

# From monorepo/
scripts/push-skills

此操作会推送到 skills 远程仓库([email protected]:editframe/skills.git)。

skills-sync 标签会跟踪上次同步的提交:

git tag -f -a skills-sync HEAD -m "skills synced $(date -I)"
git push skills skills-sync

CI 监控

# Poll telecine deploy until complete
scripts/wait-for-telecine-action

# Poll elements release until complete
scripts/wait-for-elements-action

# Get failed job logs
scripts/gh-logs editframe/telecine
scripts/gh-logs editframe/elements

Telecine 部署门禁

推送到 telecine/main 会触发 CI。只有在 build-runner、所有 docker (*) 矩阵任务、integration、typecheck 和 playwright 全部通过后,部署任务才会运行。允许直接推送到 main——CI 会控制部署。

分支的标准工作流:

# From telecine/
git push origin <branch>
# Open PR on github.com/editframe/telecine, let CI pass, merge
# Then from monorepo/
scripts/wait-for-telecine-action

评论

支持 Markdown