From 2fdc5f6dda5ab26d5c1109ba75501798a3050e50 Mon Sep 17 00:00:00 2001 From: Wanderingss <1624155937@qq.com> Date: Mon, 12 Oct 2026 19:04:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=20ci.yml=20=E6=B3=A8=E9=87=8A?= =?UTF-8?q?=E5=86=99=E6=AD=BB=E7=9A=84=E9=92=A9=E5=AD=90=E6=95=B0=EF=BC=9A?= =?UTF-8?q?=E6=94=B9=E4=B8=BA"=E6=8A=A5=E5=91=8A=E6=95=B0=20=3D=20?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E6=95=B0=20=E2=88=92=201"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 钩子数在两个分支上不同(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 对该文件 通过。 --- .gitea/workflows/ci.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 458e8d8a..53302745 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -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. #