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