-
Notifications
You must be signed in to change notification settings - Fork 934
fix: Revert
in the beginning of commit message ignores all rules
#3691
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Looks like this works as intended. |
You are right. I was searching through the doc for option like this but missed it. Plus I was a bit confused by /*
* Functions that return true if commitlint should ignore the given message.
*/
ignores: [(commit) => commit === ''], So it seems like it ignores only empty string. And ignores: undefined,
defaultIgnores: undefined, Would it be possible to add link to https://github.com/conventional-changelog/commitlint/blob/master/%40commitlint/is-ignored/src/defaults.ts#L17 into documentation or document the ignored regexes somewhere? What do you think? |
Sure, happy for any PRs improving the docs! |
PR is here: #3692 |
Checks need to be approved. Just did that. Thanks! Will merge. Closing this. |
Expected Behavior
When message starts with
Revert
keyword, I would expect the rules are evaluated too. But all rules are now completely ignored.Current Behavior
If there is Revert, no check is performed at all.
But without Revert, everything goes well
Affected packages
Possible Solution
No response
Steps to Reproduce
Context
We use Release please action to trigger releases when specific subject is in the message. And when message is like
Revert "feat: xxx"
it is not triggering release.Plus we have some limitations in our pipeline, that specific characters cannot be in commit message. Like
"
or'
or`
.So we have custom rule, but that one is never applied, if there is
Revert
in the beginning of the message.commitlint --version
@commitlint/[email protected]
git --version
git version 2.42.0
node --version
v18.13.0
The text was updated successfully, but these errors were encountered: