Skip to content

Commit 75331a1

Browse files
authored
docs: --ai-attribution-only and pins for v2.20.2 (#78)
## Why commit-check 2.20.2 is out: it renames `--ai-only` to `--ai-attribution-only` (commit-check#677), with the old name kept as a hidden alias. The site still shows `--ai-only` and pins v2.20.1. ## What changes - `guides/policies.md` "Checking a pull request description": both examples use `--ai-attribution-only`. - `changelog.md`: a v2.20.2 entry for the rename; the 2.20.1 Highlights row uses the new name and notes the old one. - Pre-commit `rev:` pins to v2.20.2 (configuration, example, compare/tools, guides/pre-commit). ## Before and after | | Before | After | |---|---|---| | Policies guide example | `gh pr view 42 ... \| commit-check --ai-only` | `gh pr view 42 ... \| commit-check --ai-attribution-only` | | Pre-commit pins | `rev: v2.20.1` | `rev: v2.20.2` | | Changelog | latest v2.20.1 | v2.20.2 entry for the rename | ## Checks - `pytest tests` with commit-check 2.20.2 installed: 18 passed (pins match PyPI). - `mkdocs build --strict`: clean. Co-authored-by: Xianpeng Shen <3353385+shenxianpeng@users.noreply.github.com>
1 parent b4bf321 commit 75331a1

6 files changed

Lines changed: 21 additions & 10 deletions

File tree

‎docs/changelog.md‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ below and to the page that documents the feature properly.
1111

1212
| Version | What changed | Documented in |
1313
|---|---|---|
14-
| [2.20.1](#v2201) | `--ai-only` checks a pull request description against the AI rules; JSON reports `ai_tools`; Warp, Crush, credit trailers and agent run links recognised | [Checking a pull request description](guides/policies.md#checking-a-pull-request-description) · [CC013](rules.md#cc013) |
14+
| [2.20.1](#v2201) | `--ai-attribution-only` (named `--ai-only` in 2.20.1) checks a pull request description against the AI rules; JSON reports `ai_tools`; Warp, Crush, credit trailers and agent run links recognised | [Checking a pull request description](guides/policies.md#checking-a-pull-request-description) · [CC013](rules.md#cc013) |
1515
| [2.20.0](#v2200) | A commit authored by an AI tool rejected (CC017); Continue, Mistral Vibe and Qwen Code recognised; subject length `0` turns the rule off; Python 3.10 dropped | [CC017](rules.md#cc017) · [CC013](rules.md#cc013) · [CC004](rules.md#cc004) |
1616
| [2.19.5](#v2195) | GitHub merge queue branches accepted by default; aider's default co-author trailer recognised; exit 2 when git cannot read the repository | [CC201](rules.md#cc201) · [CC013](rules.md#cc013) · [Exit codes](troubleshoot.md#exit-codes) |
1717
| [2.19.4](#v2194) | `agents/` branches accepted by default; Cursor's `Made-with: Cursor` trailer recognised | [CC201](rules.md#cc201) · [CC013](rules.md#cc013) |
@@ -38,6 +38,17 @@ below and to the page that documents the feature properly.
3838
| [2.5.0](#v250) | Organization-wide config with `inherit_from` | [Across an organization](guides/organization.md) |
3939
| [2.0.0](#v200) | Configuration moved from YAML to TOML — breaking | [Migrating from v1](migration.md) |
4040

41+
## v2.20.2 (2026-11-08) { #v2202 }
42+
43+
### Changed
44+
45+
* **`--ai-only` is now `--ai-attribution-only`** — the new name says what the
46+
run is limited to: the AI attribution of the text, and it pairs with the
47+
`--ai-attribution` policy option. `--ai-only` still works, so a script
48+
written against 2.20.1 needs no change; it is no longer listed in
49+
`--help`. See [Checking a pull request description](guides/policies.md#checking-a-pull-request-description).
50+
See PR [#677](https://github.com/commit-check/commit-check/pull/677).
51+
4152
## v2.20.1 (2026-11-08) { #v2201 }
4253

4354
### Added

‎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.1
68+
rev: v2.20.2
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.1
277+
rev: v2.20.2
278278
hooks:
279279
- id: check-message
280280
args:

‎docs/example.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ pushed:
162162
```yaml title=".pre-commit-config.yaml"
163163
repos:
164164
- repo: https://github.com/commit-check/commit-check
165-
rev: v2.20.1
165+
rev: v2.20.2
166166
hooks:
167167
- id: check-no-force-push
168168
stages: [pre-push]

‎docs/guides/policies.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,12 +207,12 @@ v20261103` is 95 characters.
207207

208208
Agents leave their mark in the pull request description as often as in the
209209
commits: `🤖 Generated with Claude Code`, `Link to Devin run: https://app.devin.ai/sessions/...`,
210-
a Codex task or Cursor agent link. `--ai-only` holds any text to the AI rules
210+
a Codex task or Cursor agent link. `--ai-attribution-only` holds any text to the AI rules
211211
alone, so the description is not judged as a Conventional Commit:
212212

213213
```console
214214
$ set -o pipefail # a failed `gh` must not pass as an empty description
215-
$ gh pr view 42 --json body -q .body | commit-check --ai-only
215+
$ gh pr view 42 --json body -q .body | commit-check --ai-attribution-only
216216
```
217217

218218
Under `ai_attribution = "forbid"` a description with an agent's mark fails
@@ -222,7 +222,7 @@ passes; `--format json` still lists what it found in `ai_tools`, which is
222222
enough to label the pull request:
223223

224224
```console
225-
$ gh pr view 42 --json body -q .body | commit-check --ai-only --format json | jq -c '.ai_tools'
225+
$ gh pr view 42 --json body -q .body | commit-check --ai-attribution-only --format json | jq -c '.ai_tools'
226226
["Devin"]
227227
```
228228

‎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.1
11+
rev: v2.20.2
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.1
71+
rev: v2.20.2
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.1
93+
rev: v2.20.2
9494
hooks:
9595
- id: check-message
9696
args: [--fix]

0 commit comments

Comments
 (0)