You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 8ac62e8
Browse filesBrowse the repository at this point in the historyBrowse files
<!-- ccr-projects-attribution: {"github_login":"shenxianpeng"} -->
_Requested by **Xianpeng** · [project
thread](https://claude.ai/code/project/chan_017XBs7zagX2sxAJ7SUwfyPW?thread=cmsg_017XBs7zagX2sxAJ7SUwfyPWGW1J6v52rdKGW6MGk2bt6z)_
Before: the site described 2.18.2, while 2.18.3 is what `pip install
commit-check` gets. The pre-commit snippets installed 2.18.2 and the
changelog stopped there. `--fix` and the warning for a misspelt setting
were documented nowhere. The GitLab, Bitbucket and Azure jobs piped the
branch name into `--branch`, a workaround 2.18.3 no longer needs. The
pre-commit guide's hook table had no `check-tag` or `check-files`,
although the README sends readers there for them.
After: the site describes 2.18.3.
- **Site in step with v2.18.3**, per AGENTS.md: the four pre-commit pins
move from v2.18.2 to v2.18.3. The changelog gains the v2.18.3 entry,
dated 2026-10-07 (the GitHub release and the PyPI upload), with a
Highlights row because the release adds user-visible behaviour.
- **GitLab CI, Bitbucket and Azure Pipelines:** each job runs a plain
`commit-check --branch`, which reads the CI's own variables since
commit-check/commit-check#600. A note keeps the piped form for 2.18.2
and older, which pinned installs still need.
- **Command-line recipes:** a "Fixing a message in place" section for
`--fix` (commit-check/commit-check#594), and a paragraph on how
`--branch` names the branch on a detached checkout.
- **Pre-commit hook:** `args: [--fix]` on `check-message`. The hook
table adds `check-files` and `check-tag`, pre-push hooks since 2.16.0,
and gives `check-message` its full range, CC001–CC016 since 2.18.0; the
App guide had the same stale range. A note says pre-commit runs no hook
for a push that creates a ref without new commits, so a tag pushed on
its own after its commit is never checked.
- **Configuration:** "Settings nothing reads", for the warning from
commit-check/commit-check#593.
How: every sample is a transcript from 2.18.3. I ran `--fix` on a
message file, on stdin, with `--rev` and with `--dry-run`, and ran the
`check-message` hook with `args: [--fix]` through pre-commit at `rev:
v2.18.3`; it recorded `Fix: add streaming support` as `fix: add
streaming support`. For the branch step, a plain `commit-check --branch`
on a detached checkout passed a valid name and failed `bad_branch_name`
under each CI's variables, including both forms of Azure's source
branch. For the push hooks, with pre-commit 4.6.2 at `rev: v2.18.3`:
`check-files` rejected a 4 KB file over `max_size = "1KB"`, `check-tag`
rejected `release-2.0` pushed with its commit, and `release-1.0`, pushed
alone on a commit the remote already had, ran no hook at all (pre-commit
skips a new ref that carries no commits the remote lacks).
Checks: `python -m pytest tests/ -q` passes against the released 2.18.3
(10 passed); before the pin change,
`test_pinned_revisions_match_the_released_version` failed as expected.
`mkdocs build --strict` passes with `SOCIAL_CARDS=false`, and every new
in-page link resolves to an anchor in the built site. The YAML snippets
parse.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_013rE6bouKaJvsRyKA4tjqCb
---------
Copy file name to clipboardExpand all lines: docs/changelog.md
+35Lines changed: 35 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,7 @@ below and to the page that documents the feature properly.
11
11
12
12
| Version | What changed | Documented in |
13
13
|---|---|---|
14
+
|[2.18.3](#v2183)|`--fix` corrects a message in place; `--branch` reads GitLab, Bitbucket, Azure and Jenkins variables |[Fixing a message in place](example.md#fixing-a-message-in-place) · [Other CI](guides/other-ci.md)|
14
15
|[2.18.0](#v2180)| AI disclosure policy: three rules, and the correction written for you |[Policy guides](guides/policies.md#asking-for-disclosure-instead) · [CC014](rules.md#cc014)|
15
16
|[2.17.0](#v2170)| Concrete corrections for mechanical slips; a `warn` level per rule |[Reading the JSON](example.md#reading-the-json) · [Report without enforcing](configuration.md#report-a-rule-without-enforcing-it)|
16
17
|[2.16.0](#v2160)| Tag name validation, and file size, path and pattern policies |[CC401](rules.md#cc401) · [CC302–CC304](rules.md#push-rules)|
@@ -29,6 +30,40 @@ below and to the page that documents the feature properly.
29
30
|[2.5.0](#v250)| Organization-wide config with `inherit_from`|[Across an organization](guides/organization.md)|
30
31
|[2.0.0](#v200)| Configuration moved from YAML to TOML — breaking |[Migrating from v1](migration.md)|
31
32
33
+
## v2.18.3 (2026-10-07) { #v2183 }
34
+
35
+
### Added
36
+
37
+
***`--fix` corrects a commit message in place** — when every message check
38
+
the commit failed has a mechanical fix, the ones `--format json` reports in
39
+
`fix`, the message file is rewritten and the check passes, so
40
+
`Fix: add streaming support` is recorded as `fix: add streaming support`.
41
+
Anything that takes a judgment, such as a subject with no type at all,
42
+
leaves the file as it was and is rejected as before. It needs a message
43
+
file, so stdin and `--rev` are a usage error, and `--dry-run` rewrites
44
+
nothing. With pre-commit it is `args: [--fix]` on `check-message`.
45
+
See PR [#594](https://github.com/commit-check/commit-check/pull/594) and
46
+
[Fixing a message in place](example.md#fixing-a-message-in-place).
47
+
48
+
***`--branch` reads the branch from GitLab, Bitbucket, Azure and Jenkins** —
49
+
on a detached checkout git names no branch, and only GitHub's variables
50
+
were read, so elsewhere the name became `HEAD`, which is always allowed, and
51
+
every branch passed. Each CI's own variables are now read, a merge or pull
52
+
request's source branch first, and Jenkins' only inside a Jenkins build that
53
+
is not a tag build. A pipeline that runs `--branch` on a long-lived branch
54
+
such as `develop` now has that name judged; `allow_branch_names` can allow
55
+
it.
56
+
See PR [#600](https://github.com/commit-check/commit-check/pull/600) and
57
+
[GitLab CI, Bitbucket and Azure Pipelines](guides/other-ci.md).
58
+
59
+
***A setting nothing reads is named** — a misspelt key in `cchk.toml` was
60
+
ignored in silence, and its rule stayed at the default. Each one is now
61
+
reported on stderr with the closest real name, as in `⚠ unknown setting
62
+
[commit] subject_max_lenght is ignored; did you mean subject_max_length?`.
63
+
The exit code and the JSON do not change.
64
+
See PR [#593](https://github.com/commit-check/commit-check/pull/593) and
0 commit comments