Merge pull request '發佈 jsc-git 0.0.2:pr 技能新增 slugify.sh 分支命名工具與稽核修正' (#4) from develop into master
Reviewed-on: #4 Reviewed-by: 系統管理員 <1+admin@noreply.localhost>
This commit was merged in pull request #4.
This commit is contained in:
@@ -1,75 +1,89 @@
|
|||||||
{
|
{
|
||||||
"name": "jsc",
|
"name": "jsc",
|
||||||
|
"description": "jsc 跨 AI 助理技能組的統一 marketplace(claude / codex / copilot / antigravity / kiro)。",
|
||||||
|
"owner": {
|
||||||
|
"name": "JSC"
|
||||||
|
},
|
||||||
"plugins": [
|
"plugins": [
|
||||||
{
|
{
|
||||||
"name": "jsc-ask",
|
"name": "jsc-ask",
|
||||||
"source": {
|
"source": {
|
||||||
"source": "url",
|
"source": "url",
|
||||||
"url": "https://gitea.jsc.idv.tw/plugins/ask.git"
|
"url": "https://gitea.jsc.idv.tw/plugins/ask.git"
|
||||||
}
|
},
|
||||||
|
"description": "決策樹問詢與問詢紀錄(QUESTION_* wiki 頁)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "jsc-cli",
|
"name": "jsc-cli",
|
||||||
"source": {
|
"source": {
|
||||||
"source": "url",
|
"source": "url",
|
||||||
"url": "https://gitea.jsc.idv.tw/plugins/cli.git"
|
"url": "https://gitea.jsc.idv.tw/plugins/cli.git"
|
||||||
}
|
},
|
||||||
|
"description": "CLI 偵測、模型能力標籤與技能庫批次部署"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "jsc-git",
|
"name": "jsc-git",
|
||||||
"source": {
|
"source": {
|
||||||
"source": "url",
|
"source": "url",
|
||||||
"url": "https://gitea.jsc.idv.tw/plugins/git.git"
|
"url": "https://gitea.jsc.idv.tw/plugins/git.git"
|
||||||
}
|
},
|
||||||
|
"description": "Commit 分組認可與 Push Request 建立"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "jsc-gitea",
|
"name": "jsc-gitea",
|
||||||
"source": {
|
"source": {
|
||||||
"source": "url",
|
"source": "url",
|
||||||
"url": "https://gitea.jsc.idv.tw/plugins/gitea.git"
|
"url": "https://gitea.jsc.idv.tw/plugins/gitea.git"
|
||||||
}
|
},
|
||||||
|
"description": "Gitea API 工具、Wiki 讀寫與存取庫批次同步"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "jsc-hooks",
|
"name": "jsc-hooks",
|
||||||
"source": {
|
"source": {
|
||||||
"source": "url",
|
"source": "url",
|
||||||
"url": "https://gitea.jsc.idv.tw/plugins/hooks.git"
|
"url": "https://gitea.jsc.idv.tw/plugins/hooks.git"
|
||||||
}
|
},
|
||||||
|
"description": "跨 CLI hooks:STE100 語言強制、工時計時、技能用量記錄"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "jsc-log",
|
"name": "jsc-log",
|
||||||
"source": {
|
"source": {
|
||||||
"source": "url",
|
"source": "url",
|
||||||
"url": "https://gitea.jsc.idv.tw/plugins/log.git"
|
"url": "https://gitea.jsc.idv.tw/plugins/log.git"
|
||||||
}
|
},
|
||||||
|
"description": "工作日誌(LOG_* wiki 頁)與技能使用統計"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "jsc-meta",
|
"name": "jsc-meta",
|
||||||
"source": {
|
"source": {
|
||||||
"source": "url",
|
"source": "url",
|
||||||
"url": "https://gitea.jsc.idv.tw/plugins/meta.git"
|
"url": "https://gitea.jsc.idv.tw/plugins/meta.git"
|
||||||
}
|
},
|
||||||
|
"description": "技能組自我管理:新建、更新、刪除技能與技能準則"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "jsc-pkg",
|
"name": "jsc-pkg",
|
||||||
"source": {
|
"source": {
|
||||||
"source": "url",
|
"source": "url",
|
||||||
"url": "https://gitea.jsc.idv.tw/plugins/pkg.git"
|
"url": "https://gitea.jsc.idv.tw/plugins/pkg.git"
|
||||||
}
|
},
|
||||||
|
"description": "套件批次更新(nodejs/python/dotnet),失敗還原"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "jsc-review",
|
"name": "jsc-review",
|
||||||
"source": {
|
"source": {
|
||||||
"source": "url",
|
"source": "url",
|
||||||
"url": "https://gitea.jsc.idv.tw/plugins/review.git"
|
"url": "https://gitea.jsc.idv.tw/plugins/review.git"
|
||||||
}
|
},
|
||||||
|
"description": "程式碼審查:Refactoring 壞味道六組 + 註解規範 + 淺模組"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "jsc-sdlc",
|
"name": "jsc-sdlc",
|
||||||
"source": {
|
"source": {
|
||||||
"source": "url",
|
"source": "url",
|
||||||
"url": "https://gitea.jsc.idv.tw/plugins/sdlc.git"
|
"url": "https://gitea.jsc.idv.tw/plugins/sdlc.git"
|
||||||
}
|
},
|
||||||
|
"description": "開發生命週期:規劃/分析/實作/維護(wiki 追蹤)"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,7 +59,7 @@
|
|||||||
"source": "url",
|
"source": "url",
|
||||||
"url": "https://gitea.jsc.idv.tw/plugins/meta.git"
|
"url": "https://gitea.jsc.idv.tw/plugins/meta.git"
|
||||||
},
|
},
|
||||||
"description": "技能組自我管理:新建/更新/刪除技能與技能準則"
|
"description": "技能組自我管理:新建、更新、刪除技能與技能準則"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "jsc-pkg",
|
"name": "jsc-pkg",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "jsc-git",
|
"name": "jsc-git",
|
||||||
"version": "0.0.1",
|
"version": "0.0.2",
|
||||||
"description": "Commit 分組認可與 Push Request 建立",
|
"description": "Commit 分組認可與 Push Request 建立",
|
||||||
"skills": "./skills",
|
"skills": "./skills",
|
||||||
"author": {
|
"author": {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "jsc-git",
|
"name": "jsc-git",
|
||||||
"version": "0.0.1",
|
"version": "0.0.2",
|
||||||
"description": "Commit 分組認可與 Push Request 建立",
|
"description": "Commit 分組認可與 Push Request 建立",
|
||||||
"skills": "./skills"
|
"skills": "./skills"
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "jsc-git",
|
"name": "jsc-git",
|
||||||
"version": "0.0.1",
|
"version": "0.0.2",
|
||||||
"description": "Commit 分組認可與 Push Request 建立",
|
"description": "Commit 分組認可與 Push Request 建立",
|
||||||
"skills": "./skills/"
|
"skills": "./skills/"
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -12,7 +12,7 @@ description: Commit all changes via jsc-git:commit, create a target branch named
|
|||||||
3. Create the target branch from the remote base branch:
|
3. Create the target branch from the remote base branch:
|
||||||
1. Take the type with the highest priority across all commits: `revert > fix > feat > perf > refactor > test > docs > style > chore`.
|
1. Take the type with the highest priority across all commits: `revert > fix > feat > perf > refactor > test > docs > style > chore`.
|
||||||
2. Summarize one title from all commit messages.
|
2. Summarize one title from all commit messages.
|
||||||
3. Branch names allow **ASCII only**; always slugify as `{type}/{requirement or feature}-{title}`. Translate the requirement and title into a short English phrase first, then lowercase, replace every character outside `a-z0-9` with a hyphen, collapse consecutive hyphens, and trim leading and trailing hyphens (example: `feat/order-匯出報表` → `feat/order-export-report`). No spaces, parentheses, colons, or any non-ASCII character.
|
3. Branch names allow **ASCII only**; always slugify as `{type}/{requirement or feature}-{title}`. Translate the requirement and title into a short English phrase first, then call `tools/slugify.sh {type} {phrase}` to produce the final slug (example: translate a non-English request to English first, then slugify — "export report" → export-report → feat/order-export-report). No spaces, parentheses, colons, or any non-ASCII character.
|
||||||
4. Run `git push -u origin {target branch}`.
|
4. Run `git push -u origin {target branch}`.
|
||||||
5. Create the PR: `jsc-gitea/tools/gitea.sh pr-create {owner}/{repo} {target branch} {base branch} "{branch name}" {description file}`.
|
5. Create the PR: `jsc-gitea/tools/gitea.sh pr-create {owner}/{repo} {target branch} {base branch} "{branch name}" {description file}`.
|
||||||
- Title = branch name.
|
- Title = branch name.
|
||||||
@@ -26,4 +26,4 @@ description: Commit all changes via jsc-git:commit, create a target branch named
|
|||||||
|
|
||||||
1. No template section may stay empty: fill the literal 「無」 when there is no plan page, analyze page, or prerequisite PR.
|
1. No template section may stay empty: fill the literal 「無」 when there is no plan page, analyze page, or prerequisite PR.
|
||||||
2. Take the plan page and analyze page links from the `jsc-sdlc` wiki pages; the analyze link must point at the work package heading anchor.
|
2. Take the plan page and analyze page links from the `jsc-sdlc` wiki pages; the analyze link must point at the work package heading anchor.
|
||||||
3. The description drafting details **MUST run as a sub agent**.
|
3. Branch title summarization (step 3.2) and description drafting MUST run as a sub agent.
|
||||||
|
|||||||
Executable
+20
@@ -0,0 +1,20 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
# slugify.sh — 把分支類型與描述轉成 ASCII 分支名 slug。
|
||||||
|
# 用法: slugify.sh {type} {phrase}
|
||||||
|
# 規則: 全部轉小寫,非 a-z0-9 的字元換成連字號,
|
||||||
|
# 連續連字號合併成一個,並去除開頭與結尾的連字號。
|
||||||
|
# 輸出: {type}/{slug}(例如: slugify.sh feat "export report" → feat/export-report)
|
||||||
|
set -u
|
||||||
|
|
||||||
|
if [ "$#" -lt 2 ]; then
|
||||||
|
echo "用法: slugify.sh {type} {phrase}" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
TYPE="$1"
|
||||||
|
shift
|
||||||
|
PHRASE="$*"
|
||||||
|
|
||||||
|
slug=$(printf '%s' "$PHRASE" | tr '[:upper:]' '[:lower:]' | sed -e 's/[^a-z0-9]/-/g' -e 's/-\{2,\}/-/g' -e 's/^-//' -e 's/-$//')
|
||||||
|
|
||||||
|
printf '%s/%s\n' "$TYPE" "$slug"
|
||||||
Reference in New Issue
Block a user