A collection of opinionated git hooks to automate part of our workflow
- Someone leaked a database key, we need to regenerate it. @here update all your local secret files.
- Oops! I forgot to fix tests, too.
- LGTM but fix lint errors before merging.
- After merging your branch it doesn't compile anymore! | Have you tried
yarn install? | oops...
- Prevent from committing secrets
- Update dependencies when switching/merging branches
- Prevent from pushing untested code
- Prepend the storyid to the commit message if the branch is in the shape
storyId-descriptionwherestoryIdis expected to be a number.
git-secrets- see here for more info.
cd into your target project's root and then
bash <(curl -s https://raw.githubusercontent.com/pagopa/git-hooks/master/install.sh)Clone this repository anywhere in your machine, cd into your target project's root and then
path/to/git-hooks-repo/install.sh 1Alternatively, pick any hook you like in ./hooks folder and copy&paste into the .git/hooks folder of your project.
See ./hooks folder for details