Been trying to workout my ideal process for using Git to automate my tests etc. Anything I’ve missed, or anything you would change?
Those marked with (B) will block the action from continuing if they fail. All others will show a message in the Terminal but let the user continue.
- Check message is in present tense
- If more than 6 files have modifications check for multiline commit message
- (B) Is the author a generic account (admin, root, etc)?
- Do all Python files pass pep8?
- Are there any “TODO:”s in the source?
- (B) Do all tests pass?
The pre-push will have to be a custom script which is aliased as “git push” as I don’t think it has a hook. Plus I would like a way of opting-out from running the tests on individual pushes.
So output would be something like:
Suggestions welcome :)