-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy path.pre-commit-hooks.yaml
More file actions
48 lines (47 loc) · 2.25 KB
/
Copy path.pre-commit-hooks.yaml
File metadata and controls
48 lines (47 loc) · 2.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Pre-commit framework manifest (iter-158).
#
# Makes the cc-skills conventional-commits arc consumable by the polyglot
# pre-commit framework (https://pre-commit.com). Operators add:
#
# repos:
# - repo: https://github.com/terrylica/cc-skills
# rev: v21.66.0 # or any tagged release
# hooks:
# - id: cc-skills-commits-advise-commit-msg
#
# in their own .pre-commit-config.yaml, then run:
#
# pre-commit install --hook-type commit-msg
#
# After that, every `git commit` runs the iter-153 advisor --strict on the
# proposed subject line, rejecting silent-fail-class violations
# (COMPOUND-PREFIX, MISSING-TYPE) before they reach the repository history.
#
# Spec reference: https://pre-commit.com/#new-hooks
#
# `language: script` is the correct choice for shipping a bash script ALONGSIDE
# the hook repo (per the official spec). With `language: script`, pre-commit
# resolves `entry` as a RELATIVE PATH within the cloned hook repo's root and
# invokes the file directly (uses its shebang). It executes the file from the
# cloned cache, NOT from the operator's $PATH.
#
# Iter-159 empirically validated this: an earlier draft used `language: system`,
# which treats `entry` as a $PATH-resolvable command — pre-commit could not
# locate `scripts/iter158-...sh` because the cloned cache is not on $PATH. The
# iter-159 end-to-end harness caught the bug before it reached upstream
# consumers of the manifest.
- id: cc-skills-commits-advise-commit-msg
name: "iter-153 advisor: validate conventional-commit subject (cc-skills)"
description: >-
Validates the proposed commit subject through the iter-82/iter-151
grammar in iter-153 --strict mode. Rejects COMPOUND-PREFIX (e.g.,
'feat(scope)+docs:') and MISSING-TYPE (e.g., 'just fix the thing')
violations that semantic-release silently skips. The iter-150 50/72
long-subject overlay remains informational even in strict mode (does
not block commits).
entry: scripts/iter158-pre-commit-framework-entry-point-script-locating-iter153-advisor-via-bash-source-relative-path-resolution-for-consumption-by-polyglot-pre-commit-framework-from-its-hidden-cached-clone-of-cc-skills.sh
language: script
stages: [commit-msg]
pass_filenames: true
always_run: false
minimum_pre_commit_version: "2.10.0"