1.7 KiB
1.7 KiB
name, description
| name | description |
|---|---|
| pr | Commit all changes via jsc-git:commit, create a target branch named from the highest-priority commit type plus a summarized title, push, then open a Gitea PR with the templated description. Branch priority is revert > fix > feat > perf > refactor > test > docs > style > chore. Use when work is ready for review; not for plain commits. |
pr — 建立 Push Request
步驟
- 呼叫
jsc-git:commit將所有檔案變更認可完成。 - 決定來源分支:遠端存在
develop就用develop,否則用main(再否則用master)。 - 從遠端來源分支建立目標分支:
- 類型取所有 commit 中優先度最高者:
revert > fix > feat > perf > refactor > test > docs > style > chore。 - 標題從所有 commit 的訊息總結出一句。
- 分支名只允許 ASCII,一律 slug 化:
{類型}/{需求 or 功能}-{標題}。需求/功能與標題先翻譯成英文短語,再轉小寫、非a-z0-9字元以連字號取代、連續連字號合併、頭尾連字號移除(例:feat/order-匯出報表→feat/order-export-report)。不可含空白、括號、冒號與任何非 ASCII 字元。
- 類型取所有 commit 中優先度最高者:
git push -u origin {目標分支}。- 建立 PR:
jsc-gitea/tools/gitea.sh pr-create {owner}/{repo} {目標分支} {來源分支} "{分支名}" {描述檔}。- 標題 = 分支名。
- 描述先套用
templates/pr-description.md寫入暫存檔再帶入。
- 回報 PR URL。
規則
- 描述範本各節不可留空:沒有計畫/分析頁就填「無」,沒有前置 PR 就填「無」。
- 計畫頁與分析頁連結由
jsc-sdlc的 wiki 頁取得;分析頁連結必須導向工作包標題錨點。 - 描述草擬的細節必須以 sub agent 執行。