-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat(check commit): add pre-commit and hook #12
Conversation
I'm not really a fan of having to install NPM to just have commit format validation... Especially handled by Gradle on the build task:
So this feature could be interesting if it was included inside the git repository directly (without NPM tooling) or maybe in the CI process (validating the commit history during the pull-requests). @clemstoquart , @celcius112 , any other feedback regarding this "feature"? |
Hi guys, I agree with @leomillon , I'm not comfortable to delegate that kind of check to a node module. |
Wouldn't it be interesting to develop our own plugin ? :) |
I think it should probably be a git hook configuration only (nothing managed by Gradle or any other building tool) And finally, even if it was a git configuration only, the In my opinion, the only proper solution could be a custom scan of pull-request commits during the CI build... |
I agree too with leo. It seems there already are solutions for enforcing git rules during the CI build. A shame that we don't have similar capabilities as in Gitlab for this. |
Don't forget that using a standard commit linter is cool because we have access to standard rules, standard tools using standard commit formats etc. without reinventing anything. I think "Where we plug it" (local exec with git hook VS PR CI) might be the most important question. By the way @leomillon, you can use |
@Crow-EH I understand the goal of this approach to have a "cleaner" commit historic but, on the day to day work process:
The overall picture, to me, seems a bit too "strict" with too many constraints and installation costs when we can just say: the merge-request is there to ensure that everything is in order to be merged in the project history. |
Use npm to have a feature of git hook checking for conventional commits.
Pro : a ready-to-use solution
Cons : introduce package.json in the project
But with this kind of solution we can have the same requirement on commits for front and back projects ...
Maybe will it be interesting to add this kind of feature in our gradle-quality-plugin ...?