release: v0.0.7 develop 到 master #10
@@ -33,7 +33,7 @@ Marketplace 統一為 `jsc`(https://gitea.jsc.idv.tw/plugins/meta.git),安
|
||||
|
||||
### `commit`
|
||||
|
||||
追蹤所有檔案變更,依 Commit 格式 `{類型}({需求 or 功能}): {訊息}` 將同類型與同需求的變更認可在一起。訊息格式三選一:完整版(What/Why/How/Who)、簡易版(依 git diff 總結一句)、自訂。
|
||||
追蹤所有檔案變更,依 Commit 格式 `{類型}({需求 or 功能}): {訊息}` 將同類型與同需求的變更認可在一起。認可前先跑 `jsc-hooks` 的 `comment-scope.sh sweep` 掃過工作區,攔下夾帶文件相關資訊的註解;腳本不在本機就跳過並在回報中說明,不中止認可。訊息格式三選一:完整版(What/Why/How/Who)、簡易版(依 git diff 總結一句)、自訂。
|
||||
|
||||
### `pr`
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: commit
|
||||
description: Group all pending file changes by conventional type and feature, then commit each group as {type}({scope}): {message}. Message style is full (What/Why/How/Who), brief (one line from git diff), or custom, chosen via decision tree. Use whenever changes must be committed; not for push or PR creation.
|
||||
description: Group all pending file changes by conventional type and feature, then commit each group as {type}({scope}): {message}. Before committing, sweep the working tree with jsc-hooks/hooks/comment-scope.sh so no comment carrying document tracking information enters a commit. Message style is full (What/Why/How/Who), brief (one line from git diff), or custom, chosen via decision tree. Use whenever changes must be committed; not for push or PR creation.
|
||||
---
|
||||
|
||||
# commit — group and commit file changes
|
||||
@@ -8,8 +8,13 @@ description: Group all pending file changes by conventional type and feature, th
|
||||
## Steps
|
||||
|
||||
1. Track every file change: inspect all changes with `git status --porcelain` first, then `git add` group by group. `git add -A` followed by one bulk commit is forbidden. Done when every path listed by `git status --porcelain` is assigned to exactly one group, before the first commit runs.
|
||||
2. Group the changes by same type plus same requirement or feature. One group is one commit. Done when each group carries one type and one requirement or feature, and no path sits in two groups.
|
||||
3. Commit each group with the format `{type}({requirement or feature}): {message}`. Done when `git status --porcelain` returns empty; report done only then.
|
||||
2. Sweep the comments about to be committed: run `jsc-hooks/hooks/comment-scope.sh sweep` over this working tree. A code comment states why the code is written this way, never where the work is documented; the rule text and its allow list live in one place only, `jsc-review/references/comment-scope.md`.
|
||||
- The script exits 0 in silence when it finds no git working tree and when `jsc-hooks` is not on this machine. **If the script is not found, skip this step, say so in the report and commit anyway** — missing infrastructure is not a violation.
|
||||
- Exit 2 means a hit. Fix every comment line the warning points at, in place, then run the sweep again until it exits 0, and commit only after that.
|
||||
- The warning is written for a person and a model to judge, **not a hard block**. When it is a false positive, say plainly why and carry on with the commit; never delete a useful comment just to keep the script quiet.
|
||||
- Done when one of these is true and reported: the sweep exited 0, or every remaining warning is reported with the reason it is a false positive, or the script was not found on this machine.
|
||||
3. Group the changes by same type plus same requirement or feature. One group is one commit. Done when each group carries one type and one requirement or feature, and no path sits in two groups.
|
||||
4. Commit each group with the format `{type}({requirement or feature}): {message}`. Done when `git status --porcelain` returns empty; report done only then.
|
||||
|
||||
## Type table
|
||||
|
||||
|
||||
Reference in New Issue
Block a user