-
Notifications
You must be signed in to change notification settings - Fork 102
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
Ignoring commits based on rules #54
Comments
Agreed that this isn't the ideal solution. I'll tag this as an enhancement, but just FYI that I don't think I'll be able to work on this for a while (think months). Potential workaround is to put gitlint in a bash script and just do some bash magic (untested, probably buggy): #!/bin/bash
set -e # fail on error, needed for the script to skip gitlint for maven messages
MESSAGE=$(git log -1 --pretty=%B)
echo "$MESSAGE" | grep -v "[maven-release-plugin] prepare release"
echo "$MESSAGE" | grep -v "[maven-release-plugin] something else to ignore"
echo "$MESSAGE" | grep -v "[maven-release-plugin] ignoring more"
echo "$MESSAGE" | gitlint |
FYI that there's some work going on related to this: #57 No ETA on when this will land. |
Added a new IgnoreByTitle rule that is based on a new more generic rule construct called ConfigurationRule. ConfigurationRules can modify gitlint configuration (and therefore behavior) on a per commit basis. Added some tests and docs, more docs and integration tests to follow in additional commits. This is part of #54 and #57.
There are plans to add some sort of rule based commit ignoring?
We are using maven and the release precess add commits with messages like:
Or
I can modify maven configuration to include a
gitlint-ignore: all
but thats really not the best solution IMO.The idea was something in the line of author, title or body ignore rule, if the commit match that rule then is not processed.
The text was updated successfully, but these errors were encountered: