← 输入框|github.com|刷新
Skip to content

fix(config): don't warn about [commit] require_verified, read by the App - #656

Merged
shenxianpeng merged 1 commit into
mainfrom
feat/app-require-verified-key
Nov 5, 2026
Merged

shenxianpeng merged 1 commit into
mainfrom
feat/app-require-verified-key

Conversation

@shenxianpeng

@shenxianpeng shenxianpeng commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

Why

The GitHub App is adding [commit] require_verified = true (every commit must show Verified on GitHub), in commit-check/commit-check-app#57. Only the App can read GitHub's verdict on a signature, so the CLI leaves the key alone, the same way it leaves [jira] and [pull_request].

Before / after

Config:

[commit]
require_verified = true

Before (2.19.4):

$ commit-check -m
⚠ unknown setting [commit] require_verified is ignored; did you mean require_body?

After: no warning. The key is allowed only under [commit]; [branch] require_verified still warns.

Tests

pytest: 1474 passed; the one failure (test_load_config_file_permission_error) also fails on main when run as root. Coverage 100%. ruff check and ruff format --check clean. README pins already at v2.19.4.

Summary by CodeRabbit

  • Bug Fixes
    • Configuration checks now recognize the commit.require_verified setting, preventing it from being incorrectly flagged as unknown.
    • Unsupported settings, such as branch.require_verified, continue to be reported.

…tHub App reads

The App is adding require_verified (GitHub's Verified badge on each
commit). The CLI cannot see that verdict and leaves the key to the App,
the way it leaves [jira] and [pull_request].
@shenxianpeng
shenxianpeng requested a review from a team as a code owner November 5, 2026 17:06
@shenxianpeng shenxianpeng self-assigned this Nov 5, 2026
@github-actions github-actions Bot added bug Something isn't working enhancement New feature or request labels Nov 5, 2026
@coderabbitai

coderabbitai Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The config merger now recognizes commit.require_verified during unknown-setting checks. A test verifies that this key is accepted under commit and remains unknown under branch.

Changes: Unknown setting recognition

Layer / File(s) Summary
Recognize commit.require_verified
commit_check/config_merger.py, tests/config_merger_test.py
The unknown-setting check excludes require_verified under commit. The test verifies that the key is still reported as unknown under branch.

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

Change: Bug fix

Suggested labels: bug

Merge Risk: Low · up to fc4ec

The configuration change has no identified code defect, but the PR title must be shortened for the failing check to pass.

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 and concisely describes the main change: preventing warnings for the [commit] require_verified setting read by the App.
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 1 functions across 2 files.

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: e2e82e46-f23c-4e1f-93d1-c4df72197e62
Commits

Reviewing files that changed from the base of the PR and between 88a0b0b and fc4ecc5.

Files selected for processing: 2

  • commit_check/config_merger.py
  • tests/config_merger_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.

@sonarqubecloud

sonarqubecloud Bot commented Nov 5, 2026

Copy link
Copy Markdown

@shenxianpeng shenxianpeng changed the title fix(config): don't warn about [commit] require_verified, which the GitHub App reads fix(config): don't warn about [commit] require_verified, read by the App Nov 5, 2026
@codecov

codecov Bot commented Nov 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (88a0b0b) to head (fc4ecc5).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #656   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           14        14           
  Lines         2456      2457    +1     
  Branches       477       477           
=========================================
+ Hits          2456      2457    +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.

@shenxianpeng
shenxianpeng merged commit 72dcc86 into main Nov 5, 2026
31 of 34 checks passed
@shenxianpeng
shenxianpeng deleted the feat/app-require-verified-key branch November 5, 2026 17:42
@codspeed

codspeed Bot commented Nov 5, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

1 warning

⚠️ 136 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

✅ 653 untouched benchmarks
⏩ 126 skipped benchmarks1


Comparing feat/app-require-verified-key (fc4ecc5) with main (88a0b0b)

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

@shenxianpeng shenxianpeng removed the enhancement New feature or request label Nov 8, 2026
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