Skip to content

Commit ced8ec6

Browse files
authored
docs: pin v2.20.5 and add its changelog entry (#84)
**Before:** the site describes 2.20.4. The six pre-commit snippets pin `rev: v2.20.4`, the changelog stops at v2.20.4, and two pages describe behaviour 2.20.5 changed: - "Checking the committer" does not say the author checks were skipped on a repository's first commit. - CC017 says the advice names `user.*` and `GIT_AUTHOR_*`, and adds `author.name` / `author.email` as a separate hint. **After:** the site describes 2.20.5, published 2026-11-11. - All six snippets pin `rev: v2.20.5`. - The changelog has a v2.20.5 entry (four lines) and a Highlights row. - "Checking the committer" says the identity is checked on a first commit from 2.20.5 on. - CC017 lists the four settings the advice itself now names. What the released 2.20.5 prints in the two cases: ```console $ git init -q . && git config user.name claude # no commit yet, author_name_pattern set $ commit-check --author-name ✖ Commit rejected by Commit Check · 1 check failed ✖ CC101 author-name failed: claude The committer name seems invalid Suggest: git config user.name 'Your Name' Docs: https://commit-check.com/rules/#cc101 ``` ```console $ echo "feat: add streaming support" | commit-check -m # author.name is Claude, ai_attribution = "forbid" ✖ Commit rejected by Commit Check · 1 check failed ✖ CC017 ai-author failed: Claude <noreply@anthropic.com> An AI tool is the commit author: Claude Code Suggest: Commit as yourself: set git config user.name and user.email to your own, and unset author.name, author.email, GIT_AUTHOR_NAME and GIT_AUTHOR_EMAIL if a tool set them; a commit that already exists then needs git commit --amend --reset-author Docs: https://commit-check.com/rules/#cc017 ``` 2.20.4 printed `⊘ skipped (not validated): author-name` for the first. **How** - "About half the time to start" in the changelog is measured on the two released wheels with `commit-check -m <file>`: 480M instructions on 2.20.4 against 244M on 2.20.5 (callgrind), 119 ms against 68 ms wall time (median of 25 runs). - `tests/docs_sync_test.py` passes against the installed 2.20.5 (18 tests) and `mkdocs build --strict` is clean. - Blog posts and the two homepage transcripts recorded with 2.20.4 are left as they are. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Documentation** * Added v2.20.5 release highlights covering first-use compilation of AI signature patterns, PyPI provenance attestations, author checks on a repository’s first commit, and updated CC017 guidance. * Clarified which author identity settings can override `user.name` and `user.email`, and when to unset them. * Updated pre-commit configuration examples to use v2.20.5. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: Xianpeng Shen <3353385+shenxianpeng@users.noreply.github.com>
1 parent 8337fe5 commit ced8ec6

6 files changed

Lines changed: 24 additions & 10 deletions

File tree

‎docs/changelog.md‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ page that documents it.
1111

1212
| Version | What changed | Documented in |
1313
|---|---|---|
14+
| [2.20.5](#v2205) | The author checks cover a repository's first commit; a run takes about half the time to start; releases on PyPI carry provenance | [Checking the committer](example.md#checking-the-committer) · [CC017](rules.md#cc017) |
1415
| [2.20.3](#v2203) | Failures print a one-line header and an indented block per check, in place of the ASCII banner; an agent skill for coding agents | [Getting started](getting-started.md#2-watch-it-reject-something) · [With AI coding agents](guides/ai-agents.md#tell-the-agent) |
1516
| [2.20.1](#v2201) | `--ai-attribution-only` checks a pull request description against your AI policy; JSON lists the AI tools found; more AI marks recognised | [Checking a pull request description](guides/policies.md#checking-a-pull-request-description) · [CC013](rules.md#cc013) |
1617
| [2.20.0](#v2200) | Commits authored by an AI tool rejected; subject length `0` turns the rule off; Python 3.11+ required | [CC017](rules.md#cc017) · [CC013](rules.md#cc013) · [CC004](rules.md#cc004) |
@@ -39,6 +40,18 @@ page that documents it.
3940
| [2.5.0](#v250) | Organization-wide config with `inherit_from` | [Across an organization](guides/organization.md) |
4041
| [2.0.0](#v200) | Configuration moved from YAML to TOML — breaking | [Migrating from v1](migration.md) |
4142

43+
## v2.20.5 (2026-11-11) { #v2205 }
44+
45+
### Changed
46+
47+
* A run takes about half the time to start: the AI signature patterns are compiled when first used. ([#693](https://github.com/commit-check/commit-check/pull/693))
48+
* Releases on PyPI carry provenance attestations. ([#691](https://github.com/commit-check/commit-check/pull/691))
49+
50+
### Fixed
51+
52+
* `--author-name` and `--author-email` check a repository's first commit, instead of being skipped until a commit exists. ([Checking the committer](example.md#checking-the-committer), [#692](https://github.com/commit-check/commit-check/pull/692))
53+
* CC017's advice for a message not yet committed names `author.name` and `author.email` among the settings to unset. ([CC017](rules.md#cc017), [#692](https://github.com/commit-check/commit-check/pull/692))
54+
4255
## v2.20.4 (2026-11-10) { #v2204 }
4356

4457
### Fixed

‎docs/compare/tools.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Replace the hook:
6565
```yaml title=".pre-commit-config.yaml"
6666
repos:
6767
- repo: https://github.com/commit-check/commit-check
68-
rev: v2.20.4
68+
rev: v2.20.5
6969
hooks:
7070
- id: check-message
7171
```

‎docs/configuration.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ Used from a hook definition, with no config file anywhere in the repository:
274274
```yaml title=".pre-commit-config.yaml"
275275
repos:
276276
- repo: https://github.com/commit-check/commit-check
277-
rev: v2.20.4
277+
rev: v2.20.5
278278
hooks:
279279
- id: check-message
280280
args:

‎docs/example.md‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,9 @@ Without `--rev`, these validate the *local git config* — whoever is about to
144144
commit — falling back to `HEAD`'s author only when no identity is configured.
145145
The identity is read in git's order: `GIT_AUTHOR_NAME` and
146146
`GIT_AUTHOR_EMAIL` when set, then `author.name` and `author.email`, then
147-
`user.name` and `user.email`.
147+
`user.name` and `user.email`. From 2.20.5 on that identity is checked on a
148+
repository's first commit too; earlier versions skipped both checks until a
149+
commit existed.
148150
That is the right subject for a hook and the wrong one for CI: an existing
149151
commit's identity is a fact about the commit, not about the operator running
150152
the check. Add `--rev` and both checks read that commit's recorded author, and
@@ -167,7 +169,7 @@ pushed:
167169
```yaml title=".pre-commit-config.yaml"
168170
repos:
169171
- repo: https://github.com/commit-check/commit-check
170-
rev: v2.20.4
172+
rev: v2.20.5
171173
hooks:
172174
- id: check-no-force-push
173175
stages: [pre-push]

‎docs/guides/pre-commit.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Add Commit Check to `.pre-commit-config.yaml`:
88
```yaml title=".pre-commit-config.yaml"
99
repos:
1010
- repo: https://github.com/commit-check/commit-check
11-
rev: v2.20.4
11+
rev: v2.20.5
1212
hooks:
1313
- id: check-message
1414
- id: check-branch
@@ -68,7 +68,7 @@ Options can be passed as hook arguments, which keeps everything in one file:
6868
```yaml title=".pre-commit-config.yaml"
6969
repos:
7070
- repo: https://github.com/commit-check/commit-check
71-
rev: v2.20.4
71+
rev: v2.20.5
7272
hooks:
7373
- id: check-message
7474
args:
@@ -90,7 +90,7 @@ colon, and lets the commit through:
9090
```yaml title=".pre-commit-config.yaml"
9191
repos:
9292
- repo: https://github.com/commit-check/commit-check
93-
rev: v2.20.4
93+
rev: v2.20.5
9494
hooks:
9595
- id: check-message
9696
args: [--fix]

‎docs/rules.md‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -753,9 +753,8 @@ is, and it is what GitHub shows as the contributor.
753753
The commit fails even with a human `Co-authored-by:` line. When the message
754754
is checked before the commit exists, there is nothing to amend yet, so the
755755
suggestion is to set `user.name` and `user.email` to your own and to unset
756-
`GIT_AUTHOR_NAME` and `GIT_AUTHOR_EMAIL`. If `author.name` or `author.email`
757-
names the tool, unset those as well: they outrank `user.name` and
758-
`user.email`.
756+
`author.name`, `author.email`, `GIT_AUTHOR_NAME` and `GIT_AUTHOR_EMAIL` if a
757+
tool set them. All four outrank `user.name` and `user.email`.
759758

760759
**Options**
761760

0 commit comments

Comments
 (0)