-
Notifications
You must be signed in to change notification settings - Fork 440
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
Don't do commit message checks on merges? #1099
Comments
That could be a nice addition to the task. |
@veewee sure, can you point me to the code I should be looking at? |
The code for this specific task is located here: Currently, there is a merge matching mechanism for skipping validation on scope conventions: grumphp/src/Task/Git/CommitMessage.php Lines 366 to 384 in d0e23de
It might make sense to extract these merge patterns into a separate function so that it can be used to determine if the task needs to run at all. You could use that same check to skip running the scope conventions. That specific task is becoming a bit messy because of historical reasons and is open for improvements :) |
Thanks @veewee I'll have a look! |
Nice :) (Ik ben van de Kempen!) |
I'm now able to merge without a JIRA number on a merge! But let me know if I should move that is merge commit check further up or down the chain of events, I allowed it to still go through the first rules, like not empty message etc. Also, you mentioned a flag setting so we can have the merge skip enabled or disabled, how/where do we go about adding the setting? |
Of course, I have broken your tests in doing this :P But I'll wait for your feedback first before continuing work! |
Cool. Let's continue the discussion in the PR. |
Is there a way of NOT doing the Git Commit Message checks when doing a merge? It works great for us on our ticket branches, and we also have a hook adding the ticket number automatically from the branch name, but when we are on develop or master, there is no ticket number, so when we merge it doesn't like it!
The text was updated successfully, but these errors were encountered: