Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature => Pre-commit hook #14

Merged
merged 12 commits into from
Aug 9, 2019
Merged
9 changes: 9 additions & 0 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
- id: helm_docs
args: []
description: Uses 'helm-docs' to create documentation from the Helm chart's 'values.yaml' file, and inserts the result into a corresponding 'README.md' file.
entry: scripts/helm_docs.sh
exclude: charts\/.*$
files: (Chart\.yaml)$
sc250024 marked this conversation as resolved.
Show resolved Hide resolved
language: script
name: Helm docs
require_serial: true
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,3 +174,14 @@ configMap:
not real config param: value
```

## Pre-commit hook
sc250024 marked this conversation as resolved.
Show resolved Hide resolved

If you want to automatically generate `README.md` files with pre-commit hook, make sure you have the pre-commit binary installed (instructions here: [https://pre-commit.com/#install](https://pre-commit.com/#install)), and add the following file to your Helm charts repository:

**.pre-commit-config.yaml**
```yaml
- repo: https://github.com/norwoodj/helm-docs
rev: master
hooks:
- id: helm_docs
```
Loading