/command-hook

Precommit command hook : Run any command at pre commit.

Primary LanguagePythonApache License 2.0Apache-2.0

Command Hook Pre-Commit

Hook any unit test / set up script / update env command before commits.

A few useful git hooks to integrate with pre-commit.

Check Appendix E. Exit Codes With Special Meanings

Using command-hook with pre-commit

Add this to your .pre-commit-config.yaml:

-   repo: https://github.com/zonito/command-hook.git
    sha: ''  # Use the sha you want to point at
    hooks:
    -   id: command
        args: [--command, '<EXECUTE UNITTEST COMMAND BEFORE COMMIT>']