Pre-commit hook
Pre-commit is a multi-language package manager for pre-commit hooks. You specify a list of hooks you want and pre-commit manages the installation and execution of the hooks.
# sample .pre-commit-config.yaml for a project that would like to use datree with pre-commit
repos:
- repo: https://github.com/datreeio/datree
# rev is the .pre-commit-hooks.yaml version
# could also be a version or a release tag
rev: HEAD
hooks:
- id: datree-docker
tip
The pre-commit hook is using our docker image to run Datree CLI to it requires to have docker installed on the machine.