|
23 | 23 |
|
24 | 24 | The GitHub Action for [Commit Check](https://github.com/commit-check/commit-check), |
25 | 25 | commit policy as code for teams and AI agents. It checks every commit of a pull |
26 | | -request — message, branch, author, and optionally the PR title — against your |
27 | | -`cchk.toml`, and reports the result in the job summary, as annotations on the |
28 | | -diff and, if you want, as a PR comment. |
| 26 | +request — message, branch, author, and optionally the PR title and the AI |
| 27 | +attribution in its description — against your `cchk.toml`, and reports the |
| 28 | +result in the job summary, as annotations on the diff and, if you want, as a PR |
| 29 | +comment. It can also label the pull requests that AI tools wrote. |
29 | 30 |
|
30 | 31 | ## Usage |
31 | 32 |
|
@@ -160,6 +161,28 @@ The step log prints the same tree, plus one annotation per finding on the |
160 | 161 | Files changed tab. With `pr-comments: true` the same report is posted to the |
161 | 162 | pull request, and later runs edit that one comment instead of adding more. |
162 | 163 |
|
| 164 | +With `pr-body-ai-attribution: true` and `ai_attribution = "forbid"`, a |
| 165 | +description that credits an AI co-author fails the same way, and the report |
| 166 | +names the line to remove: |
| 167 | + |
| 168 | +> ❌ **1 of 2 checks failed** |
| 169 | +> |
| 170 | +> | Scope | Checked value | Failed checks | |
| 171 | +> |---|---|---| |
| 172 | +> | PR description | `Claude Code` | [CC013 ai-attribution](https://commit-check.com/rules/#cc013) | |
| 173 | +> |
| 174 | +> ```text |
| 175 | +> PR description |
| 176 | +> ✖ PR description (1 failure) |
| 177 | +> CC013 ai-attribution |
| 178 | +> value: Claude Code |
| 179 | +> AI attribution is forbidden in this project — detected: Claude Code |
| 180 | +> Suggest: In the description, remove "Co-Authored-By: Claude <noreply@anthropic.com>" |
| 181 | +> ``` |
| 182 | + |
| 183 | +With `ai-label: true`, a pull request an AI tool wrote also gets the |
| 184 | +`ai-assisted` label. |
| 185 | + |
163 | 186 | ## Outputs |
164 | 187 |
|
165 | 188 | ### `result` |
|
0 commit comments