Skip to content

feat: say why checks were skipped in the report - #300

Merged
shenxianpeng merged 2 commits into
mainfrom
claude/action-skip-reason-ew9d3p
Oct 8, 2026
Merged

shenxianpeng merged 2 commits into
mainfrom
claude/action-skip-reason-ew9d3p

Conversation

@shenxianpeng

@shenxianpeng shenxianpeng commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Requested by Xianpeng · project thread

Before: on #299 the PR comment said "⊘ All 5 checks skipped — nothing was validated" and every line read just "(skipped)". The real cause, dependabot[bot] being on ignore_authors in the org config, appeared nowhere.

After:

⊘ **All 5 checks skipped** — nothing was validated

Skipped because author dependabot[bot] is in ignore_authors.

  ⊘ PR title (skipped: author dependabot[bot] is in [commit].ignore_authors)
  ⊘ Branch (skipped: author dependabot[bot] is in [branch].ignore_authors)
  ...

The sentence under the verdict drops the config section so the usual bot case is one short reason; the per-line reasons in the collapsed block keep it. The same sentence follows the partial-skip verdict and the step-log verdict. The Action's own shallow-clone author skip now says "the pull request's head commit could not be resolved".

How: ScopeResult.skip_reason reads the reason field that commit-check/commit-check#605 (merged) adds to --format json. With the current CLI (no reason) the output is unchanged, so this is safe to merge first; the reason shows once a commit-check release with #605 is pinned in requirements.txt. The real-binary contract test now accepts reason as an optional key so that bump stays green.

Checked locally: 230 tests pass with 100% coverage of main.py against commit-check 2.18.3, the contract tests pass against commit-check main, and black and mypy are clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_019ik2pnYPYJJ5e3GYGeoPgE

Summary by CodeRabbit

  • New Features
    • Skipped scopes now include an available reason in step logs and Markdown reports, making it clearer why a scope was skipped.
    • Verdicts summarize skip reasons when available, including when all scopes or only some scopes are skipped.
  • Documentation
    • Updated the output examples to show reason-bearing skip messages and the fallback for older command-line versions.

When commit-check names a reason for a skipped check (an author on an
ignore_authors list), the report shows it on each skipped line and in
one sentence under the verdict, so a skipped run no longer reads as
unexplained. An older CLI that sends no reason renders as before.
@shenxianpeng shenxianpeng self-assigned this Oct 8, 2026
@coderabbitai

coderabbitai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 870244fe-df38-4c68-ad31-99c6bb3dd902
📥 Commits

Reviewing files that changed from the base of the PR and between 400525e and ed93400.

📒 Files selected for processing (2)
  • 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.


📝 Walkthrough

Walkthrough

Skipped scopes expose an available reason. Step-log and Markdown output show reasons on skipped-scope labels and include deduplicated reason text in verdicts. Tests cover skipped and passing scopes, aggregate output, and optional reason fields in CLI check data.

Changes

Skipped-scope reason reporting

Layer / File(s) Summary
Expose skip reasons
main.py, main_test.py
ScopeResult.skip_reason returns the first nonempty check reason for skipped scopes. Skipped author checks now include a reason when the pull request head commit cannot be resolved. Tests cover the reason field and optional test-fixture reasons.
Render reasons in reports
main.py, main_test.py
Step-log and Markdown output append available reasons to skipped-scope labels and add deduplicated reason text to verdicts. Tests and the output example cover aggregate wording and CLI output with or without optional reasons.

Priority: ⬇️ Low

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

Change: Feature

Merge Risk: ⚪ Minimal · up to ed934

No actionable merge-blocking issue was found. Reports retain the older-CLI behavior when no reason is provided.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 76.19% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 21 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding skip reasons to check reports.
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.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · 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

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Commit Check

✅ All 6 checks passed

Show all 6 checks
Commit message
  ✔ PR title (feat: say why checks were skipped in the report)
  ✔ Commit 1/2 (874136e) (feat: say why checks were skipped in the report)
  ✔ Commit 2/2 (ed93400) (fix: keep the skip sentence short)
Branch
  ✔ Branch (claude/action-skip-reason-ew9d3p)
Author
  ✔ Author name (Xianpeng Shen)
  ✔ Author email (3353385+shenxianpeng@users.noreply.github.com)

commit-check 2.18.3 · Rules reference

@codecov

codecov Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (400525e) to head (ed93400).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #300   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines          637       654   +17     
=========================================
+ Hits           637       654   +17     
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 enhancement New feature or request label Oct 8, 2026
Drop the config section from the verdict sentence so the common bot
case reads "Skipped because author dependabot[bot] is in
ignore_authors." once; the per-line reasons keep the section. Accept
the CLI's new optional reason key in the real-binary contract test.
@shenxianpeng
shenxianpeng marked this pull request as ready for review October 8, 2026 09:38
@shenxianpeng
shenxianpeng requested a review from a team as a code owner October 8, 2026 09:38
@shenxianpeng
shenxianpeng merged commit a617797 into main Oct 8, 2026
24 checks passed
@shenxianpeng
shenxianpeng deleted the claude/action-skip-reason-ew9d3p branch October 8, 2026 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant