-
Notifications
You must be signed in to change notification settings - Fork 915
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
@commitlint/config-conventional rejects default merge commit messages #365
Comments
Currently only |
I'm a little confused, I'm using the git cli on macOS. This merge was a result of |
@jedwards1211 My bad, I didn't mean to confuse you! I mistook this bug report as a feature request. As far as I can tell, you are using an old version of commitlint. In the latest version ( |
Thanks for reporting @jedwards1211 and triage @byCedric! |
Guys it is still not working. The regexp is not correct.. |
@dabit1gamma could you provide some examples where the regular expression fails for you? I think we have modified it a bit more in #439. But if you could provide some cases where the current expression is not working for you, that will be helpful. 😄 |
still not working 2023 |
How can we disable this behaviour? I looked at the documentation but I can't really see what I'm supposed to change to prevent all "Merge branch..." commits My current config is: module.exports = {extends: ['@commitlint/config-conventional']} |
True, the docs could be improved. Happy for a PR. Have a look at https://commitlint.js.org/reference/configuration.html#configuration-object-example |
Ah yes thanks, could not find this particular page. The name of the key is not very clear imo, maybe |
Another idea could be to have different presets depending on the merge method. When using rebase strategy, these commit messages should not be allowed |
I'm surprised no one has run across this, but I think it only happens after there are merge conflicts, because if there are no conflicts in the merge I think git automatically commits without running the commit message hook.
Expected Behavior
When I have merge conflicts, fix them, and then try to commit, commitlint should accept the auto-generated merge commit message.
Current Behavior
commitlint rejects the auto-generated merge commit message:
Affected packages
Possible Solution
Steps to Reproduce (for bugs)
@commitlint/config-conventional
git commit -m "Merge branch 'master' of https://github.com/commitlint/cli"
Context
Your Environment
commitlint --version
git --version
node --version
The text was updated successfully, but these errors were encountered: