Skip to content

Commit

Permalink
test: add pre-commit hook for helm-docs
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
morremeyer committed Nov 20, 2022
1 parent 26614c5 commit 089c1ac
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

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.
5 changes: 4 additions & 1 deletion renovate.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json"
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"pre-commit": {
"enabled": true
}
}

0 comments on commit 089c1ac

Please sign in to comment.