feat(git): pr 技能加入前置 PR 依賴阻擋(gitea.sh pr-depend,降級 WIP 前綴)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-21 14:03:34 +08:00
co-authored by Claude Fable 5
parent e9de83dbae
commit 0d34f4f5fb
2 changed files with 6 additions and 1 deletions
+4 -1
View File
@@ -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} {目標分支} {來源分支} "{分支名}" {描述檔}`。 5. 建立 PR:`jsc-gitea/tools/gitea.sh pr-create {owner}/{repo} {目標分支} {來源分支} "{分支名}" {描述檔}`。
- 標題 = 分支名。 - 標題 = 分支名。
- 描述先套用 `templates/pr-description.md` 寫入暫存檔再帶入。 - 描述先套用 `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。
## 規則 ## 規則
+2
View File
@@ -25,3 +25,5 @@
## 前置 Push Request ## 前置 Push Request
- {前置 PR 連結,無填「無」} - {前置 PR 連結,無填「無」}
<!-- 有前置 PR 時必須同時以 gitea.sh pr-depend 掛上依賴;依賴未關閉前 Gitea 會阻擋本 PR 合併。 -->