We are having an issue in our team and we have decided to check if there is a way or git command to reject git push where there are TODOs in the code.
Any ideas?
Thanks in advance.
We are having an issue in our team and we have decided to check
Share
EDIT: because of grep behaviour in if statement we needed to edit our script:
Is not possible use pre-receive hooks in github, so we are using instead pre-commit hook in client side:
http://git-scm.com/book/en/Customizing-Git-Git-Hooks#Client-Side-Hooks
Our pre-commit script (based on http://mark-story.com/posts/view/using-git-commit-hooks-to-prevent-stupid-mistakes) looks like:
We have this script under our control version system, and create a symbolic link to it in .git/hooks
Thanks for the help 🙂