Repository navigation
ci: pre-commit autoupdate - #123
Merged
Merged
Conversation
updates: - [github.com/pre-commit/mirrors-mypy: v1.7.0 → v1.7.1](pre-commit/mirrors-mypy@v1.7.0...v1.7.1)
|
Kudos, SonarCloud Quality Gate passed! |
shenxianpeng
added a commit
that referenced
this pull request
Jun 13, 2026
Add a `message_pattern` field to the `[commit]` config section that allows users to provide a custom regex for commit message validation. When set (non-empty), it takes precedence over the auto-generated Conventional Commits regex. This restores the custom-regex capability that was available in v1.x (YAML config) and was lost in the v2.0 TOML rewrite. It enables teams to enforce custom formats such as: - JIRA smart commits (`PROJ-123: description`) - GitHub issue references (`Fix login #123`) - Any other organization-specific message policy Changes: - rule_builder.py: check message_pattern before falling back to conventional_commits logic - config_merger.py: add message_pattern to defaults, CLI arg mapping, and env var mapping (placed adjacent to conventional_commits) - main.py: add --message-pattern CLI argument - docs/configuration.rst: document the new option in example, mapping table, and options table (placed next to conventional_commits) - docs/migration.rst: add section explaining how v1.x custom regex users can migrate to message_pattern - tests: add 5 new tests covering precedence, override, fallback, JIRA format, and GitHub issue format Closes #426
shenxianpeng
added a commit
that referenced
this pull request
Jun 29, 2026
Change the regex from ([\w ])+ to [^\n]+ for the description part of the conventional commit message. The previous pattern only allowed word characters and spaces, causing false rejections for common special characters like #, ", /, (, ), @, etc. Fixes issues like: - feat: fix bug #123 → # was rejected - fix: use "quotes" → " was rejected - docs: update API/URL → / was rejected
shenxianpeng
added a commit
that referenced
this pull request
Nov 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.








updates: