-
Notifications
You must be signed in to change notification settings - Fork 2
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
How to handle branch merges with this plugin? #130
Comments
Hi @mklueh, The best approach I could suggest is to use rebase instead of merge as a merge method for a branch. Currently, there aren't any methods to "suppress" the check. But I will investigate a way to suppress the check, somehow :) If you want to use the merge as a merge strategy, you could modify the commit message to make it conventional commit compliant. For example, if the merge commit is the last one in the local history, you could modify it with `git commit --amend" and edit the commit message (chore: Merge branch 'master' into XYZ). |
@nicolasfara Thank you! Not sure if rebasing is an option in our case. Adjusting the commit message could be an idea :) Would it be possible to exclude merges from the hook in general? For example, current scenario: One college merged a non-conventional commit into master, because the plugin is currently not on master. I try to merge master into my branch, and the plugin complains that merging is not possible because of non-conventional commits. Now in order to get it merged, I had to go to .git/hooks and delete the hook of the plugin. Would it make sense to ignore those merges and just focus on "normal" local commits? |
I am also running into something like this trying to use the plugin. My CI/CD is failing in my GitLab MR because it cannot get the hook messages. |
I tried to fix this issue by releasing a new plugin version that makes it possible to configure a regex so that if a commit message matches it, the check succeeds. Please don't hesitate to reopen this issue if there are problems with this approach. The settings key added is |
# [3.1.0](3.0.14...3.1.0) (2022-12-31) ### Features * add the ability to exclude commit message that match a configured regex. Closes [#130](#130) ([a822194](a822194))
🎉 This issue has been resolved in version 3.1.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
When you merge one branch into another, git will create messages like
Merged branch 'master' into xyz
, which obviously does not match the conventional commit pattern.What is the general approach using this plugin? Is it possible to exclude those?
The text was updated successfully, but these errors were encountered: