-
Notifications
You must be signed in to change notification settings - Fork 420
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
Adds git hooks to skeleton #113
base: master
Are you sure you want to change the base?
Adds git hooks to skeleton #113
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if the hooks get pushed to remote? If not, should this feature be plugged into the prefill
script?
Hey, I was just wondering if there are any updates on this being put in or not? Just want to make sure all is up to date before I resolve conflicts. |
Hey Nigel, I really appreciate you taking the time to propose this change and am very sorry it's taken us so long to review it! I'm honestly a bit torn on this proposal: I've previously implemented something just like this at work for very similar reasons, so I understand where you're coming from. It did force developers into the habit of testing/checking their work before committing and pushing which was good. However, it also annoyed them to the point where they started using the Personally I think it would be better if we updated That's just my $0.02 though - others may feel differently. I'm definitely open to hearing your thoughts and being persuaded 😛 Again, I do appreciate you taking the time to propose this, and for your patience in getting feedback. |
Hi @colinodell, You are totally right, this PR is very much one that has a a strong pro and con. I personally feel it's the best thing to have things automated with what we as engineers have to do on an hourly basis. We have implemented this in our projects at work to mirror the projects that are written in NodeJS (using Husky) and I must admit it has caught me a few times especially stopping those pushes where I've broken something without realising, or rushed a fix/feature and not ran the tests or linting locally. The con, as you indicate, is that the engineer will of course use That's my $0.02 😜 There could be a solution where by on As for the time on the reply, honestly don't worry. Open source is great, but I appreciate people have a life beyond coding... don't we? 😉 |
Just wanted to check in to see if I should fix the conflicts on this PR? 😃 |
Description
Allows
composer check-style
to be ran onpre-commit
andcomposer test
onpre-push
.Motivation and context
For me, it is about bringing all engineers inline. At the end of the day we are only human and automation on things like this allows to concentrate on the problem to solve and reduce potential stress.
How has this been tested?
Ran
./vendor/bin/captinhook install
and made breaking changes on code and tests to check the errors stop committing and pushing to remote.Types of changes
What types of changes does your code introduce? Put an
x
in all the boxes that apply:Checklist:
Go over all the following points, and put an
x
in all the boxes that apply.Please, please, please, don't send your pull request until all of the boxes are ticked. Once your pull request is created, it will trigger a build on our continuous integration server to make sure your tests and code style pass.
If you're unsure about any of these, don't hesitate to ask. We're here to help!