修 ci.yml 注释写死的钩子数:改为"报告数 = 定义数 − 1"
钩子数在两个分支上不同(master 18、v2-on-ui 26),注释里写死 18/17 会让 另一分支上的读者按错数字去核对,正是本轮文档清理里修掉的同类漂移。头部 注释改为讲规则并给分分支实测快照;run 块内那行同步改成纯 ASCII 的规则 表述,避免增删钩子后再次过期。 同时作为非文档路径的普通 push:新建分支 v2-on-ui-ci 的那次 push 没有产生 run(runner 在线且空闲,job 日志最新仍是 10-03),怀疑新建分支的 push 拿 不到变更文件集、被 paths-ignore 滤空,用这次提交验证。 验证:YAML 可解析、全部 run 块纯 ASCII、无 BOM、LF;pre-commit 对该文件 通过。
This commit is contained in:
@@ -57,7 +57,8 @@
|
||||
# 且"显式设置就必须有效、不静默回退"的语义不变。
|
||||
#
|
||||
# 🔴 gitlint 属 commit-msg stage,`--all-files` **永远跑不到它**(2026-10-11 审计):
|
||||
# `.pre-commit-config.yaml` 定义 18 个钩子,CI 只报 17 个(`passed=16 skipped=1`)——
|
||||
# `.pre-commit-config.yaml` 里 gitlint 那一条**永远不进 CI 报告**(报告数 = 定义数 − 1;
|
||||
# 2026-10-12 实测 `master` 18 定义 / 17 报告、`v2-on-ui` 26 定义 / 25 报告)——
|
||||
# 缺的正是 gitlint:`stages: [commit-msg]` 写在 **gitlint 上游的 .pre-commit-hooks.yaml**
|
||||
# 里(项目配置里 grep 不到这一行),而 `pre-commit run --all-files` 只跑 pre-commit stage。
|
||||
# 即 AGENTS.md 的"单行中文标题 ≤100 字符"门禁**本地有、CI 无**,
|
||||
@@ -212,7 +213,9 @@ jobs:
|
||||
# WHY THIS STEP EXISTS: gitlint is a `commit-msg` stage hook, and
|
||||
# `pre-commit run --all-files` only runs the `pre-commit` stage -- so
|
||||
# the commit-message rule was enforced locally and NEVER here, while
|
||||
# the job still reported green (17 hooks defined, 16 reported).
|
||||
# the job still reported green: the reported hook count is always
|
||||
# (defined count - 1), so a silently missing hook is invisible.
|
||||
# Recount that difference whenever hooks are added or removed.
|
||||
# pre-commit has no notion of "the commits of this push", so the
|
||||
# script feeds each commit message to the hook one at a time.
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user