Defines Git pre-commit hooks intended for use with pre-commit. The currently supported hooks are:
- branch-validate: Enforce
git
branch name for all repositories.
In each repos, add a file called .pre-commit-config.yaml
with the following:
repos:
- repo: https://github.com/clairBuoyant/pre-commit
rev: <VERSION> # Find latest from: https://github.com/clairBuoyant/pre-commit/releases
hooks:
- id: branch-validate
Every developer should also install pre-commit
locally:
- Install pre-commit.
- Run
pre-commit install
in repository.
Now every time a commit is made, the hooks specified in .pre-commit-config.yaml
will execute.
This code is released under the GNU 3.0 License. Please see LICENSE for more details.