Visitar URL original
feat: say why a check was skipped in --format json by shenxianpeng · Pull Request #605 · commit-check/commit-check · GitHub
Skip to content

feat: say why a check was skipped in --format json - #605

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

shenxianpeng merged 1 commit into
mainfrom
claude/action-skip-reason-ew9d3p

Conversation

@shenxianpeng

Copy link
Copy Markdown
Member

Requested by Xianpeng · project thread

Before: a check skipped because its author is on an ignore_authors list came back from --format json as "status": "skip" with nothing else, so consumers like the GitHub Action could only print "skipped" (see commit-check/commit-check-action#299, where all 5 checks skipped for dependabot[bot] with no explanation).

After: each check in the JSON (and the Python API) carries a reason field. It reads author dependabot[bot] is in [commit].ignore_authors, co-author … is in [commit].ignore_authors, or author … is in [branch].ignore_authors, and is empty for every other outcome.

How: validators record _skip_reason where the ignore-list decision is made (_author_in_ignore_list, _should_skip_branch_validation), and validate_all_detailed copies it onto skipped CheckOutcomes. Text-mode output is unchanged. The Action side is in commit-check/commit-check-action (same branch name) and needs a release with this change.

Checked locally: the full test suite passes (one pre-existing permission test fails only because the container runs as root), ruff check and ruff format --check are clean, and a real repo with a dependabot[bot] commit returns the reasons above for message, author and branch checks.

🤖 Generated with Claude Code

https://claude.ai/code/session_019ik2pnYPYJJ5e3GYGeoPgE


Generated by Claude Code

A skipped check now carries a reason when the author is on an
ignore_authors list, e.g. "author dependabot[bot] is in
[commit].ignore_authors", so consumers such as the GitHub Action can
tell users why nothing was validated.
@github-actions github-actions Bot added the enhancement New feature or request label Oct 8, 2026
@coderabbitai

coderabbitai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a8d1637c-2a8a-409f-8c95-1bdc265c31c8
📥 Commits

Reviewing files that changed from the base of the PR and between 1be275f and 3f73ae7.

📒 Files selected for processing (3)
  • commit_check/api.py
  • commit_check/engine.py
  • tests/engine_test.py
 _____________________________________________________
< Making Elsa proud by letting it go...to production. >
 -----------------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 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.

@sonarqubecloud

sonarqubecloud Bot commented Oct 8, 2026

Copy link
Copy Markdown

@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 (1be275f) to head (3f73ae7).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #605   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           14        14           
  Lines         2284      2292    +8     
=========================================
+ Hits          2284      2292    +8     

☔ 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 marked this pull request as ready for review October 8, 2026 09:34
@shenxianpeng
shenxianpeng requested a review from a team as a code owner October 8, 2026 09:34
@shenxianpeng
shenxianpeng merged commit f643ecd into main Oct 8, 2026
30 of 31 checks passed
@shenxianpeng
shenxianpeng deleted the claude/action-skip-reason-ew9d3p branch October 8, 2026 09:35
@codspeed

codspeed Bot commented Oct 8, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 621 untouched benchmarks
🆕 1 new benchmark
⏩ 126 skipped benchmarks1

Performance Changes

Benchmark BASE HEAD Efficiency
🆕 test_validate_all_detailed_skip_reports_ignored_author N/A 1.3 ms N/A

Comparing claude/action-skip-reason-ew9d3p (3f73ae7) with main (1be275f)

Open in CodSpeed

Footnotes

  1. 126 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

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