← 输入框|github.com|刷新
Skip to content

docs: document CC501 and pin v2.21.0 - #86

Merged
shenxianpeng merged 3 commits into
mainfrom
feature/pr-ai-declaration
Nov 16, 2026
Merged

shenxianpeng merged 3 commits into
mainfrom
feature/pr-ai-declaration

Conversation

@shenxianpeng

@shenxianpeng shenxianpeng commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Documents CC501 ai-declaration, the new CLI rule (commit-check#699) that checks a pull request description ticks exactly one of its template's AI declaration boxes.

Also pins the snippets to v2.21.0, the first release with CC501, and adds its changelog entry.

Before

The site had no way to answer "make sure the AI box in our PR template is ticked". Projects that ask it run their own script in CI.

After

  • Rules page: new "Pull request rules" section with ai-declaration (CC501): what it does, why, an example with real output, options.
  • Policies guide: recipe "Requiring the template's AI declaration" after "Checking a pull request description", with the Action and App switches.
  • Changelog and pins: v2.21.0 entry and Highlights row; the pre-commit snippets pin rev: v2.21.0.
  • Configuration: pull_request | ai_declaration_checkboxes row in "Every option"; the unknown-settings note no longer says [pull_request] is the App's alone.
  • GitHub App guide: notes that ai_declaration_checkboxes is read by the CLI and Action too.

Sample output, as the released 2.21.0 prints it:

$ gh pr view 42 --json body -q .body | commit-check --ai-attribution-only
✖ Commit rejected by Commit Check · 1 check failed

✖ CC501 ai-declaration failed: - [ ] **No AI tools were used** in preparing this PR. (+1 more line)
  No AI declaration box is ticked
  Suggest: Tick the box that applies: "No AI tools were used" or "If AI tools were used"
  Docs:    https://commit-check.com/rules/#cc501

Checked

  • mkdocs build --strict passes.
  • pytest tests passes against the released 2.21.0, and the pasted CC501 output matches what it prints.

Summary by CodeRabbit

  • New Features
    • Added an option to require exactly one configured AI declaration checkbox in pull request descriptions, with guidance for enabling the check in the CLI, GitHub Action, and App.
  • Documentation
    • Expanded policy and rule guides with configuration details, matching behavior, and failure examples.
    • Updated release notes with the new check and corrected advice for fixing missing spacing before an AI mark.
    • Updated pre-commit configuration examples to use version 2.21.0.

@netlify

netlify Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for commit-check ready!

Name Link
🔨 Latest commit 9970509
🔍 Latest deploy log https://app.netlify.com/projects/commit-check/deploys/6afb66cced2c9fc88bc49e2a
😎 Deploy Preview https://deploy-preview-86--commit-check.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Explain Change →

Walkthrough

The documentation adds guidance for CC501, which checks configured AI declaration boxes in pull request descriptions. It also records the v2.21.0 release, updates pre-commit examples, and clarifies configuration and CC014 advice.

Changes: CC501 and release documentation

Layer / File(s) Summary
CC501 configuration and usage
docs/configuration.md, docs/rules.md, docs/guides/policies.md, docs/guides/github-app.md
Documents pull_request.ai_declaration_checkboxes, CC501 checkbox matching and failure cases, and integration settings. It also clarifies unknown-setting checks for [jira] and [pull_request].
Release notes and version examples
docs/changelog.md, docs/compare/tools.md, docs/configuration.md, docs/example.md, docs/guides/pre-commit.md
Adds the v2.21.0 changelog entry, including the CC014 advice correction, and updates pre-commit examples from v2.20.5 to v2.21.0.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Merge Risk: Moderate · up to 99705

The new CC501 docs describe Action behavior that the released Action does not yet provide. Following the guide, readers may expect pull requests to be blocked when they are not, and the bot-author skip note could mislead CLI users. Fix or qualify these statements, or wait for the Action release, before publishing.

Pre-merge checks: Passed 2

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "docs: document CC501 and pin v2.21.0" matches the main changes. The changeset adds documentation for the CC501 ai-declaration rule across the rules page, policy guide, configuration docs, a…
Full details: Title check

Explanation

The title "docs: document CC501 and pin v2.21.0" matches the main changes. The changeset adds documentation for the CC501 ai-declaration rule across the rules page, policy guide, configuration docs, and GitHub App guide. It also updates pre-commit revisions from v2.20.5 to v2.21.0 in several docs files and adds a changelog entry. The title is concise, specific, and follows the conventional commit style.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@shenxianpeng shenxianpeng added the documentation Improvements or additions to documentation label Nov 16, 2026 — with Claude
@shenxianpeng shenxianpeng self-assigned this Nov 16, 2026
@shenxianpeng
shenxianpeng marked this pull request as ready for review November 16, 2026 20:25
@shenxianpeng shenxianpeng changed the title docs: document the pull request AI declaration rule (CC501) docs: document CC501 and pin v2.21.0 Nov 16, 2026
@shenxianpeng
shenxianpeng merged commit 1ed5f94 into main Nov 16, 2026
7 checks passed
@shenxianpeng
shenxianpeng deleted the feature/pr-ai-declaration branch November 16, 2026 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant