@commitlint/config-conventional rejects default merge commit messages
See original GitHub issueI’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:
⧗ input: Merge branch 'master' of https://github.com/jcoreio/webapp-apollo
✖ message may not be empty [subject-empty]
✖ type may not be empty [type-empty]
✖ found 2 problems, 0 warnings
Affected packages
- cli
- core
- prompt
- config-angular
- config-conventional?
Possible Solution
Steps to Reproduce (for bugs)
- Edit any file in a project using
@commitlint/config-conventional
- Try to commit with a fake merge commit message:
git commit -m "Merge branch 'master' of https://github.com/commitlint/cli"
Context
Your Environment
Executable | Version |
---|---|
commitlint --version |
5.2.8 |
git --version |
2.15.1 (Apple Git-101) |
node --version |
v8.9.2 |
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
New options for controlling the default commit message when ...
From repository settings, a maintainer or admin can choose the default format for commit messages produced when merging pull requests: · This ...
Read more >Git default merge commit message not including conflicts
I launched my Git merge tool and I resolved it. Once it was resolved, I performed a git commit and this opened Vim...
Read more >Push rule to reject commit message also blocks a merge to ...
Adding a push rule to restrict commit messages works except when merging the branch. I found this error happens when the Merge commit...
Read more >git Merge Commit Messages | Dave Dribin's Blog
The default git commit message for merge conflicts lists any files that were conflicts. However, it includes them as a comment with the ......
Read more >Update merge commit message - Atlassian Community
When you merge pull request, bitbucket by default generate Merge commit message. User can edit this message in "Merge pull request" dialog.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@byCedric I created a PR. With the modifications of #439 it is still not working. You can see an example which does not work in my PR. Let’s discuss it 😃
My PR: #454
Thanks for reporting @jedwards1211 and triage @byCedric! Closing this as I am very confident this is fixed in recent commitlint versions as mentioned by @byCedric here: https://github.com/marionebl/commitlint/issues/365#issuecomment-403802596