question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

@commitlint/config-conventional rejects default merge commit messages

See original GitHub issue

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:

⧗   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)

  1. Edit any file in a project using @commitlint/config-conventional
  2. 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:closed
  • Created 5 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
dabit1gammacommented, Oct 4, 2018

@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

1reaction
marioneblcommented, Sep 4, 2018

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found