Skip to content

feat: sync message_pattern support from commit-check to MCP server#17

Merged
shenxianpeng merged 2 commits into
mainfrom
feature/sync-message-pattern-to-mcp
Jul 6, 2026
Merged

feat: sync message_pattern support from commit-check to MCP server#17
shenxianpeng merged 2 commits into
mainfrom
feature/sync-message-pattern-to-mcp

Conversation

@shenxianpeng

Copy link
Copy Markdown
Member

Summary

message_pattern is a [commit] config option in commit-check that allows users to specify a custom regex pattern for commit message validation. When set, it takes precedence over the auto-generated Conventional Commits regex — useful for JIRA-style tickets like PROJ-123: description.

Since the MCP server delegates to commit-check's library (via get_default_config(), load_toml_config(), deep_merge(), and RuleBuilder()), message_pattern already works through the existing config pipeline. No code changes to the server logic are needed.

This PR adds:

  • Test coverage — two new tests verifying message_pattern works via the inline config parameter (pass on match, fail on mismatch)
  • Documentation — README note about message_pattern (v2.8.0+) and ai_attribution (v2.11.0+) as supported config features

Verification

All 67 tests pass:

67 passed in 0.97s

Related

See commit-check PR #427 for the original message_pattern implementation.

@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@shenxianpeng, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 35 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 35da3106-2024-47ca-a718-d5b64e4fc7bb

📥 Commits

Reviewing files that changed from the base of the PR and between 3793d9d and 1914d2c.

📒 Files selected for processing (2)
  • README.md
  • tests/test_server.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/sync-message-pattern-to-mcp

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.

@codecov-commenter

codecov-commenter commented Jul 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (3793d9d) to head (1914d2c).

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #17   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            2         2           
  Lines          209       209           
=========================================
  Hits           209       209           

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

message_pattern is a [commit] config option that lets users specify a
custom regex for commit message validation, overriding the Conventional
Commits rule. It already works through the existing config pipeline
(get_default_config -> load_toml_config -> deep_merge -> RuleBuilder),
but was missing test coverage.

Changes:
- Add tests: message_pattern overrides conventional commits, and fails
  on pattern mismatch
@shenxianpeng shenxianpeng force-pushed the feature/sync-message-pattern-to-mcp branch from e7d9dc0 to 2c0f8f5 Compare July 6, 2026 19:23
Updated link for the Official MCP Registry and removed outdated information.
@shenxianpeng shenxianpeng added the enhancement New feature or request label Jul 6, 2026
@shenxianpeng shenxianpeng merged commit 92d1445 into main Jul 6, 2026
6 checks passed
@shenxianpeng shenxianpeng deleted the feature/sync-message-pattern-to-mcp branch July 6, 2026 19:26
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.

2 participants