From 089c1ac8129adaa891d05d3c39e02c68fadc3258 Mon Sep 17 00:00:00 2001 From: Morre Date: Sun, 20 Nov 2022 16:57:01 +0100 Subject: [PATCH] test: add pre-commit hook for helm-docs With this change, users of pre-commit can register a pre-commit hook that automatically runs helm-docs when a chart changes. This saves contributors such as me from forgetting to run `helm-docs` every single time they commit if they want to do so. --- .pre-commit-config.yaml | 7 +++++++ README.md | 5 ++++- renovate.json | 5 ++++- 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 000000000..9b1d508e7 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,7 @@ +repos: + - repo: https://github.com/norwoodj/helm-docs + rev: v1.11.0 + hooks: + - id: helm-docs + args: + - --chart-search-root=charts diff --git a/README.md b/README.md index 48a8fd82c..d10195d5c 100644 --- a/README.md +++ b/README.md @@ -9,4 +9,7 @@ helm install my-parca parca/parca ``` ### Contributing -If you added, removed or adjusted helm values, please run [helm-docs](https://github.com/norwoodj/helm-docs) in charts/parca folder to re-generate README \ No newline at end of file + +If you added, removed or adjusted helm values, please run [helm-docs](https://github.com/norwoodj/helm-docs) in charts/parca folder to re-generate the README. + +If you have pre-commit installed, you can run `pre-commit install` to automatically run helm-docs for every commit. diff --git a/renovate.json b/renovate.json index 7190a60b6..14600ab5e 100644 --- a/renovate.json +++ b/renovate.json @@ -1,3 +1,6 @@ { - "$schema": "https://docs.renovatebot.com/renovate-schema.json" + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "pre-commit": { + "enabled": true + } }