什麼:wiki 與 repo-sync 兩支技能在 GITEA_HOST/GITEA_TOKEN 無法解析時,原本只回報認證失敗;現在改為先走 jsc-ask:ask 詢問使用者。同步將 jsc-gitea 版本號由 0.0.4 升至 0.0.5。 為什麼:guidelines 的環境變數表規定無法解析的必要環境變數要詢問使用者,不能直接回報失敗;先前兩支技能的行為不符合 jsc-meta:skill-check 的稽核規則。 如何:在 skills/wiki/SKILL.md 與 skills/repo-sync/SKILL.md 呼叫 tools/gitea.sh 前,先檢查 GITEA_HOST/GITEA_TOKEN 是否可解析(含 tea login list 的備援 token),無法解析時依 jsc-ask:ask 的決策樹詢問使用者;同時將 plugin.json、.claude-plugin/plugin.json、.codex-plugin/plugin.json 的版本號由 0.0.4 升至 0.0.5。 負責功能:Gitea 認證缺值改詢問使用者(wiki、repo-sync 兩技能共用的根因修正)。
1.6 KiB
1.6 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 — batch-sync repositories
Steps
- Before calling
tools/gitea.sh, resolveGITEA_HOSTandGITEA_TOKENfrom the current shell environment (also checktea login listfor a usable login token whenGITEA_TOKENis unset). IfGITEA_HOSTis unresolvable, orGITEA_TOKENis unset and no tea login token exists either, ask the user for the missing value per thejsc-ask:askrules before proceeding to anytools/gitea.shcall. - Run
tools/gitea.sh ownersto list every{owner}the user can read. - Ask the user which
{owner}to sync, per thejsc-ask:askrules. Every option states the owner's repo count and impact scope. - Run
tools/gitea.sh repos {owner}to list every readable{repo}under that owner. - Sync each
{repo}one by one. This step MUST run as a sub agent (one sub agent per repo):- Missing locally →
git cloneinto the working directory (clone URL fromtools/gitea.sh clone-url). - Present locally → switch to
develop, elsemaster(or the result oftools/gitea.sh default-branch), thengit pull. - Local file changes → create a branch from develop or master, commit via
jsc-git:commit, push, then open a PR back to develop or master viajsc-git:pr.
- Missing locally →
- Report the sync result for every repo: cloned, updated, PR created, or the failure reason.