From 908076620b9d5af82bb301423ddd6269e9ed00eb Mon Sep 17 00:00:00 2001 From: Xianpeng Shen <3353385+shenxianpeng@users.noreply.github.com> Date: Sun, 8 Nov 2026 22:04:40 +0000 Subject: [PATCH] docs: --ai-attribution-only and pins for v2.20.2 --- docs/changelog.md | 13 ++++++++++++- docs/compare/tools.md | 2 +- docs/configuration.md | 2 +- docs/example.md | 2 +- docs/guides/policies.md | 6 +++--- docs/guides/pre-commit.md | 6 +++--- 6 files changed, 21 insertions(+), 10 deletions(-) diff --git a/docs/changelog.md b/docs/changelog.md index f3e0144..e33453d 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -11,7 +11,7 @@ below and to the page that documents the feature properly. | Version | What changed | Documented in | |---|---|---| -| [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) | +| [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) | | [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) | | [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) | | [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. | [2.5.0](#v250) | Organization-wide config with `inherit_from` | [Across an organization](guides/organization.md) | | [2.0.0](#v200) | Configuration moved from YAML to TOML — breaking | [Migrating from v1](migration.md) | +## v2.20.2 (2026-11-08) { #v2202 } + +### Changed + +* **`--ai-only` is now `--ai-attribution-only`** — the new name says what the + run is limited to: the AI attribution of the text, and it pairs with the + `--ai-attribution` policy option. `--ai-only` still works, so a script + written against 2.20.1 needs no change; it is no longer listed in + `--help`. See [Checking a pull request description](guides/policies.md#checking-a-pull-request-description). + See PR [#677](https://github.com/commit-check/commit-check/pull/677). + ## v2.20.1 (2026-11-08) { #v2201 } ### Added diff --git a/docs/compare/tools.md b/docs/compare/tools.md index 5d0ae6f..c136ff2 100644 --- a/docs/compare/tools.md +++ b/docs/compare/tools.md @@ -65,7 +65,7 @@ Replace the hook: ```yaml title=".pre-commit-config.yaml" repos: - repo: https://github.com/commit-check/commit-check - rev: v2.20.1 + rev: v2.20.2 hooks: - id: check-message ``` diff --git a/docs/configuration.md b/docs/configuration.md index 46e3d10..3a3a09f 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -274,7 +274,7 @@ Used from a hook definition, with no config file anywhere in the repository: ```yaml title=".pre-commit-config.yaml" repos: - repo: https://github.com/commit-check/commit-check - rev: v2.20.1 + rev: v2.20.2 hooks: - id: check-message args: diff --git a/docs/example.md b/docs/example.md index 7fa022f..7a405bc 100644 --- a/docs/example.md +++ b/docs/example.md @@ -162,7 +162,7 @@ pushed: ```yaml title=".pre-commit-config.yaml" repos: - repo: https://github.com/commit-check/commit-check - rev: v2.20.1 + rev: v2.20.2 hooks: - id: check-no-force-push stages: [pre-push] diff --git a/docs/guides/policies.md b/docs/guides/policies.md index fdc3516..67743a1 100644 --- a/docs/guides/policies.md +++ b/docs/guides/policies.md @@ -207,12 +207,12 @@ v20261103` is 95 characters. Agents leave their mark in the pull request description as often as in the commits: `🤖 Generated with Claude Code`, `Link to Devin run: https://app.devin.ai/sessions/...`, -a Codex task or Cursor agent link. `--ai-only` holds any text to the AI rules +a Codex task or Cursor agent link. `--ai-attribution-only` holds any text to the AI rules alone, so the description is not judged as a Conventional Commit: ```console $ set -o pipefail # a failed `gh` must not pass as an empty description -$ gh pr view 42 --json body -q .body | commit-check --ai-only +$ gh pr view 42 --json body -q .body | commit-check --ai-attribution-only ``` 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 enough to label the pull request: ```console -$ gh pr view 42 --json body -q .body | commit-check --ai-only --format json | jq -c '.ai_tools' +$ gh pr view 42 --json body -q .body | commit-check --ai-attribution-only --format json | jq -c '.ai_tools' ["Devin"] ``` diff --git a/docs/guides/pre-commit.md b/docs/guides/pre-commit.md index 9141f42..d50be4c 100644 --- a/docs/guides/pre-commit.md +++ b/docs/guides/pre-commit.md @@ -8,7 +8,7 @@ Add Commit Check to `.pre-commit-config.yaml`: ```yaml title=".pre-commit-config.yaml" repos: - repo: https://github.com/commit-check/commit-check - rev: v2.20.1 + rev: v2.20.2 hooks: - id: check-message - id: check-branch @@ -68,7 +68,7 @@ Options can be passed as hook arguments, which keeps everything in one file: ```yaml title=".pre-commit-config.yaml" repos: - repo: https://github.com/commit-check/commit-check - rev: v2.20.1 + rev: v2.20.2 hooks: - id: check-message args: @@ -90,7 +90,7 @@ colon, and lets the commit through: ```yaml title=".pre-commit-config.yaml" repos: - repo: https://github.com/commit-check/commit-check - rev: v2.20.1 + rev: v2.20.2 hooks: - id: check-message args: [--fix]