Files
gitea/skills/repo-sync/SKILL.md
T
2026-08-21 13:08:43 +08:00

1.2 KiB

name, description
name description
repo-sync Batch-sync all readable repos of a chosen Gitea owner into the working directory. List owners, let the user pick, then clone or update each repo; local changes become a branch, commit, push, and PR to develop or master. Use for workspace bootstrap or bulk refresh; not for a single repo.

repo-sync — 存取庫批次同步

步驟

  1. tools/gitea.sh owners 列出使用者擁有讀取權限的所有 {owner}。
  2. 依 jsc-ask:ask 規則讓使用者選擇要同步的 {owner}(選項需標明各 owner 的 repo 數量與影響範圍)。
  3. tools/gitea.sh repos {owner} 列出該 owner 底下可讀取的所有 {repo}。
  4. 逐一同步每個 {repo},此步驟必須以 sub agent 執行(每個 repo 一個 sub agent):
    1. 不存在 → git clone 到工作目錄(clone URL 取自 tools/gitea.sh clone-url)。
    2. 已存在 → 切換到 develop,沒有就切 master(或 tools/gitea.sh default-branch 的結果),再 git pull。
    3. 有檔案變更 → 從 develop/master 新建分支,依 jsc-git:commit 認可、push,再依 jsc-git:pr 建立 PR 回 develop/master。
  5. 回報每個 repo 的同步結果(clone / 更新 / 建立 PR / 失敗原因)。