From bf7bec0dcd8fa037e17eef4467bde597533ab380 Mon Sep 17 00:00:00 2001 From: Dorian Turba <froggit.commit.z3jqj@simplelogin.com> Date: Wed, 10 Jan 2024 14:50:13 +0100 Subject: [PATCH] add example of use for pre-commit --- templates/python/code_quality/pre-commit/README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/templates/python/code_quality/pre-commit/README.md b/templates/python/code_quality/pre-commit/README.md index bad732c..09363f3 100644 --- a/templates/python/code_quality/pre-commit/README.md +++ b/templates/python/code_quality/pre-commit/README.md @@ -27,3 +27,14 @@ framework for managing and maintaining multi-language pre-commit hooks. To add configuration to `pre-commit`, you can add a `.pre-commit-config.yaml` file to the root of your repository. This file will be used by `pre-commit` to configure the hooks. + +## Example of use + +Here is a configuration example for `pre-commit` for `pre-push` stage: + +```yaml +pre-push: + extends: pre-commit + variables: + PRE_COMMIT_RUN: pre-commit run --all-files --hook-stage pre-push +``` -- GitLab