Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork304
feat: add custom validation#1236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
feat: add custom validation#1236
Conversation
codecovbot commentedSep 13, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@## v4-11-0 #1236 +/- ##========================================== Coverage ? 98.64% ========================================== Files ? 60 Lines ? 2664 Branches ? 0 ========================================== Hits ? 2628 Misses ? 36 Partials ? 0
Flags with carried forward coverage won't be shown.Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
fbf3813 to7bd16c3Comparebenediktziegler commentedSep 20, 2024
@Lee-W I was wondering if you had any input to this PR? |
Lee-W commentedSep 25, 2024
I'll be mostly out till at least mid-Oct, will try to check in depth after that. Thanks! |
Lee-W left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Overall, I love this idea! left a few improvement suggestions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Lee-W commentedDec 6, 2024
I'll be mostly out for the following month. Will try to take a look when I'm back. |
Lee-W left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Sorry for taking so long. Some nitpicks. but we're close to merge I think!
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Lee-W commentedNov 19, 2025
Hey@benediktziegler , I left a few nits, but overall this PR is great! We're super close to merging. |
Lee-W commentedNov 30, 2025
Hey@benediktziegler , I think we're almost good to merge this one. But could you please help us rebase from the branch |
benediktziegler commentedDec 1, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@Lee-W I agree the merging was a bit messy and seems to even contain unwanted changes in the end. I propose I force push the squashed changes from this branch into this PR:https://github.com/benediktziegler/commitizen/tree/feature/custom-validation-clean instead. Or we merge this one instead:#1680 |
Lee-W commentedDec 1, 2025
either way works perfect :) I'll take one final look at the other draft PR, if your force push didn't beat me haha |
50405b0 to265cb98Comparebenediktziegler commentedDec 2, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Both are the same now, so I drop the draft PR. Potential conflict with#1657. |
d7ceab8 intocommitizen-tools:v4-11-0Uh oh!
There was an error while loading.Please reload this page.
Lee-W commentedDec 3, 2025
Super! Thanks so much! |
Description
This PR adds functionality to customise the commit message validation and to format the
InvalidCommitMessageErrorto give better/more detailed feedback to the user.Checklist
./scripts/formatand./scripts/testlocally to ensure this change passes linter check and testExpected behavior
The developer of a custom commitizen class can override the
validate_commit_messageandformat_error_messagemethods to perform more complex commit message format checks then just a regex match and give more detailed feedback on failure.Steps to Test This Pull Request
Run the the
test_check_command_with_custom_validator_succeedandtest_check_command_with_custom_validator_failtests intest_check_command.py.Additional context
This PR implements and fixes the comments from#648.