Skip to content

fix: do not head a pull request title failure "Commit rejected" - #713

Merged
shenxianpeng merged 1 commit into
mainfrom
fix/pr-text-rejection-headline
Nov 18, 2026
Merged

shenxianpeng merged 1 commit into
mainfrom
fix/pr-text-rejection-headline

Conversation

@shenxianpeng

@shenxianpeng shenxianpeng commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

What

--pr-title and --ai-attribution-only check a pull or merge request title or description. When one fails, the header now reads "Rejected by Commit Check" instead of "Commit rejected by Commit Check".

Why

The text under test is not a commit, so "Commit rejected" sends a GitLab or Bitbucket user looking for a commit to fix. "Rejected by Commit Check" is the neutral header the CLI already prints when failures span more than one subject. The JSON output and the Action are unchanged; only the text header differs.

Before vs after

$ echo "add GitLab support" | commit-check --pr-title

# before (2.22.0)
✖ Commit rejected by Commit Check · 1 check failed

# after
✖ Rejected by Commit Check · 1 check failed

Tests

New parametrized TestPrTitle::test_the_header_does_not_call_the_text_a_commit covers both flags; it fails without the fix. 1721 passed, coverage 100%, ruff clean (the one local failure, test_load_config_file_permission_error, only happens when tests run as root).

--pr-title and --ai-attribution-only check a pull or merge request
title or description, not a commit, yet a failure printed "Commit
rejected by Commit Check" above it. Print the neutral "Rejected by
Commit Check" for them instead.
@shenxianpeng
shenxianpeng requested a review from a team as a code owner November 18, 2026 12:21
@shenxianpeng shenxianpeng added the bug Something isn't working label Nov 18, 2026 — with Claude
@coderabbitai

coderabbitai Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 35 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

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: d0866616-62d5-45e2-8960-f4ab4cfbb0f8
Commits

Reviewing files that changed from the base of the PR and between 4a8c359 and 2621079.

Files selected for processing: 2

  • commit_check/engine.py
  • tests/main_test.py
  • 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 self-assigned this Nov 18, 2026
@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecov Bot commented Nov 18, 2026

Copy link
Copy Markdown

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #713   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           15        15           
  Lines         2742      2743    +1     
  Branches       546       546           
=========================================
+ Hits          2742      2743    +1     

☔ 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.

@codspeed

codspeed Bot commented Nov 18, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

1 warning

⚠️ 131 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

✅ 685 untouched benchmarks
⏩ 131 skipped benchmarks1


Comparing fix/pr-text-rejection-headline (2621079) with main (5ec09a3)2

Open in CodSpeed

Footnotes

  1. 131 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. ↩

  2. No successful run was found on main (4a8c359) during the generation of this report, so 5ec09a3 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

@shenxianpeng
shenxianpeng merged commit 44ed6c8 into main Nov 18, 2026
34 checks passed
@shenxianpeng
shenxianpeng deleted the fix/pr-text-rejection-headline branch November 18, 2026 13:11
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