Repository navigation
fix: leave the AI declaration (CC501) out under --ai-attribution ignore - #755
Conversation
commit-check-ci checks a description with --pr-body --ai-attribution ignore when pr-body-ai-attribution is off, but CC501 still ran, so a project with ai_declaration_checkboxes and require_issue_reference failed descriptions for want of the boxes. The flag now leaves CC501 out with the other AI rules on --pr-body and --ai-attribution-only; ai_attribution = "ignore" in the config, the default, keeps it.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Keeps _get_requested_checks within the cognitive complexity limit.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #755 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 17 17
Lines 3821 3826 +5
Branches 766 767 +1
=========================================
+ Hits 3821 3826 +5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Merging this PR will not alter performance1 warning
Comparing Footnotes
|



What
On GitLab and Bitbucket, commit-check-ci checks a description with
--pr-body --ai-attribution ignorewhenpr-body-ai-attributionis off. CC501 still ran in that case. A project that sets bothai_declaration_checkboxesandrequire_issue_referencetherefore failed a description that named its issue, only because it had no declaration boxes.Now an explicit
--ai-attribution ignoreon the command line, together with--pr-bodyor--ai-attribution-only, leaves CC501 out along with the other AI rules.ai_attribution = "ignore"in the config is the default, so it keeps CC501 as before.The Action (
pr-body-ai-attribution) and the App (body_ai_attribution) already behave this way. The docs already say CC501 waits for the AI switch, so no doc change is needed.Before / after
cchk.toml:Before:
After: passes. Without
--ai-attribution ignore, CC501 still runs and fails, as before.Tests
main_test.py: the flag drops CC501 on--pr-bodyand on--ai-attribution-only, and"ignore"in the config keeps it.ci_test.py: CC501 runs only withpr-body-ai-attribution.pytest tests: 2211 passed. The one failure,test_load_config_file_permission_error, also fails on main when run as root.ruffandmypyare clean.Generated by Claude Code
Summary by CodeRabbit