feat(分支基準): 參考與來源分支一律取遠端 origin,動作前先 fetch

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-08-25 11:10:55 +08:00
co-authored by Claude Opus 5
parent 082104c550
commit 543fd8c695
5 changed files with 35 additions and 15 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ All wiki reads and writes go through `jsc-gitea:wiki`.
4. Exit 0 means the stage is locked. Run this gate only when the stage changes; inside the maintenance stage the lock already covers every project, so never re-gate between projects.
2. Read `MAINTAIN_CONTENTS` via `jsc-gitea:wiki` and filter projects **still inside their maintenance window**: start date ≤ today, and (end date is NULL or ≥ today).
3. Every project **MUST run as a sub agent** with this flow:
1. Switch the project to the `develop` branch, falling back to `master`, and pull to latest.
1. Run `git fetch --prune origin`, then switch the project to `develop`, falling back to `master`, and bring it up to `origin/{該分支}` — the remote is the basis, never the local branch. Local and remote diverged → report and skip that project; never `pull --rebase`, `reset` or discard anything on your own.
2. Propose **at least five** maintenance methods and apply the ones that fit the project, for example:
- dependency updates (reuse `jsc-pkg:pkg-update`)
- security vulnerability scan and patching