From 0d34f4f5fb879f7a4ce7e7387e896369e894d554 Mon Sep 17 00:00:00 2001 From: Jeffery Date: Fri, 21 Aug 2026 14:03:34 +0800 Subject: [PATCH] =?UTF-8?q?feat(git):=20pr=20=E6=8A=80=E8=83=BD=E5=8A=A0?= =?UTF-8?q?=E5=85=A5=E5=89=8D=E7=BD=AE=20PR=20=E4=BE=9D=E8=B3=B4=E9=98=BB?= =?UTF-8?q?=E6=93=8B=EF=BC=88gitea.sh=20pr-depend=EF=BC=8C=E9=99=8D?= =?UTF-8?q?=E7=B4=9A=20WIP=20=E5=89=8D=E7=B6=B4=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- skills/pr/SKILL.md | 5 ++++- templates/pr-description.md | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/skills/pr/SKILL.md b/skills/pr/SKILL.md index edac96f..28a58e2 100644 --- a/skills/pr/SKILL.md +++ b/skills/pr/SKILL.md @@ -17,7 +17,10 @@ description: Commit all changes via jsc-git:commit, create a target branch named 5. 建立 PR:`jsc-gitea/tools/gitea.sh pr-create {owner}/{repo} {目標分支} {來源分支} "{分支名}" {描述檔}`。 - 標題 = 分支名。 - 描述先套用 `templates/pr-description.md` 寫入暫存檔再帶入。 -6. 回報 PR URL。 +6. **前置 PR 阻擋**:描述中有前置 Push Request 時,執行 + `jsc-gitea/tools/gitea.sh pr-depend {owner}/{repo} {本 PR 編號} {前置 owner}/{repo} {前置 PR 編號}` + 把本 PR 掛上依賴;前置 PR 未關閉前 Gitea 會阻擋合併,避免誤合併。API 不可用時降級:PR 標題加 `WIP:` 前綴(Gitea 原生阻擋合併),前置完成後移除。 +7. 回報 PR URL。 ## 規則 diff --git a/templates/pr-description.md b/templates/pr-description.md index 236fb25..c1ba245 100644 --- a/templates/pr-description.md +++ b/templates/pr-description.md @@ -25,3 +25,5 @@ ## 前置 Push Request - {前置 PR 連結,無填「無」} + +