Skip to content

fix: show an AI-only check that ran no rule as skipped, and group the PR title with the description - #330

Merged
shenxianpeng merged 2 commits into
mainfrom
fix/pr-description-skip-when-ignored
Nov 9, 2026
Merged

shenxianpeng merged 2 commits into
mainfrom
fix/pr-description-skip-when-ignored

Conversation

@shenxianpeng

@shenxianpeng shenxianpeng commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

What

Two output fixes:

  1. PR description check that ran no rule now reads as skipped. Under the default ai_attribution = "ignore" the CLI runs none of the AI rules, returns an empty list of checks, and the Action showed a pass. Someone who turned on pr-body-ai-attribution and forgot the policy saw ✔ and thought descriptions were being checked.
  2. PR title and description share one "Pull request" group. The title was grouped under "Commit message" and the description sat between the title and the commits, so "Commit message" appeared twice.

Before vs after

Step log on a pull request with pr-title, pr-body-ai-attribution and message on, no ai_attribution in the config:

Before:

Commit message
  ✔ PR title (feat: add login page)
PR description
  ✔ PR description
Commit message
  ✔ Commit 1/1 (7f4ead1) (feat: add login page)

After:

Pull request
  ✔ PR title (feat: add login page)
  ⊘ PR description (skipped: ai_attribution is "ignore": set it to "forbid" or "disclose")
Commit message
  ✔ Commit 1/1 (7f4ead1) (feat: add login page)

A rule that did run keeps its verdict, and unparsable CLI output still fails.

Second commit (drop it if you prefer)

ci: forbid AI attribution in this repo adds ai_attribution = "forbid" to this repo's commit-check.toml, so the self-test checks the PR description for real. The org config's [commit] keys are still inherited (checked: CC001 still fails a non-conventional message). The last 40 commits on main pass it. A PR opened with an AI footer in its description will now fail until the footer is removed.

Tests

New tests for the skip and the grouping; five golden outputs updated for the new group. 284 tests pass; main.py stays at 100% line and branch coverage. README samples updated.

Summary by CodeRabbit

  • New Features

    • Added an AI-attribution policy setting for commit checks, including support for forbidding AI attribution.
    • Pull request descriptions with no AI-attribution rule executed can now be reported as skipped when the policy is set to ignore.
  • Improvements

    • Pull request titles and descriptions are grouped under “Pull request” in check logs and reports, separately from “Commit message” checks.

… PR title with the description

Under the default ai_attribution = "ignore" the PR description check ran
no rule but showed a pass. The title and description now share a Pull
request group, so the commit group is no longer split in two.
@shenxianpeng
shenxianpeng requested a review from a team as a code owner November 9, 2026 19:38
@shenxianpeng shenxianpeng self-assigned this Nov 9, 2026
@coderabbitai

coderabbitai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The PR marks PR description scopes as skipped when no AI-attribution rule ran and there is no raw output. It also groups PR title and description scopes under “Pull request” in report output and examples.

Changes: PR description checks and reporting

Layer / File(s) Summary
Handle PR descriptions without an AI-attribution rule
commit-check.toml, main.py, main_test.py
The self-test configuration sets ai_attribution to "forbid". When a PR description has no checks and no raw output, the flow assigns a skipped AI-attribution check. Tests cover skipped scopes, executed checks, and unparsable output.
Group pull request report scopes
main.py, main_test.py, README.md
PR title and description scopes now share the “Pull request” group. Tests and report examples reflect the grouping.

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

Change: Bug fix

Possibly related PRs

Suggested labels: bug

Merge Risk: Minimal · up to 4e433

The PR description and report-grouping changes are ready to merge after normal checks. An existing empty-output CLI failure remains undetected, but this change does not make that outcome worse.

Pre-merge checks: Passed 5

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly summarizes the main changes: marking an AI-attribution check as skipped when no rule runs and grouping the PR title with the description.
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 4 functions across 2 files. (2 skipped: 2 unsupported.)

Finishing Touches

Generate docstrings

  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • 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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 19484eed-a005-4197-862f-b92f15e00dea
Commits

Reviewing files that changed from the base of the PR and between 0264f70 and 4e433ec.

Files selected for processing: 4

  • README.md
  • commit-check.toml
  • main.py
  • main_test.py

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Commit Check

✅ All 7 checks passed

Show all 7 checks
Pull request
  ✔ PR title (fix: show an AI-only check that ran no rule as skipped, a...)
  ✔ PR description (## What)
Commit message
  ✔ Commit 1/2 (901b997) (fix: show an AI-only check that ran no rule as skipped, a...)
  ✔ Commit 2/2 (4e433ec) (ci: forbid AI attribution in this repo so the self-test c...)
Branch
  ✔ Branch (fix/pr-description-skip-when-ignored)
Author
  ✔ Author name (Xianpeng Shen)
  ✔ Author email (3353385+shenxianpeng@users.noreply.github.com)

commit-check 2.20.2 · Rules reference

@github-actions github-actions Bot added the ai-assisted Written with the help of an AI tool label Nov 9, 2026
@shenxianpeng shenxianpeng removed the ai-assisted Written with the help of an AI tool label Nov 9, 2026 — with Claude
@codecov

codecov Bot commented Nov 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (0264f70) to head (4e433ec).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #330   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines          791       799    +8     
=========================================
+ Hits           791       799    +8     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@shenxianpeng shenxianpeng added the bug Something isn't working label Nov 9, 2026
@shenxianpeng
shenxianpeng merged commit 8b7bc6d into main Nov 9, 2026
22 of 25 checks passed
@shenxianpeng
shenxianpeng deleted the fix/pr-description-skip-when-ignored branch November 9, 2026 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant