bitnami / readme-generator-for-helm

Auto generate READMEs for Helm Charts
https://bitnami.com
Apache License 2.0
212 stars 48 forks source link

Run using pre-commit #45

Closed martimors closed 8 months ago

martimors commented 2 years ago

Following the completion of https://github.com/bitnami-labs/readme-generator-for-helm/issues/36, it could be nice to be able to run the generator as a pre-commit hook. That would significantly simplify running this tool in a CI context, as well as helping chart contributors document configuration options correctly.

I can potentially contribute to this depending on my schedule, but if anyone else wants to do it please feel free. It should be as straight forward as adding a single file to the root of the repo (I think...).

miguelaeh commented 2 years ago

Thanks for the suggestion @dingobar . Please feel free to contribute with such a feature.

It was not added before because it requires every developer to install the hooks locally. For example, in the case you use GitHub for the charts, configuring a GitHub action to run the generator will enforce the execution on every Chart PR without requiring the developers to install the hooks.

martimors commented 1 year ago

1 year later, I randomly stumbled upon my issue again, as the need arose again for generating docs, and I don't want to have to manually install a tool to do this when it could easily just install itself using pre-commit.

I don't understand the explanation given above. Why is it a bad thing to install pre-commit hooks locally? Isn't this the whole point of them? The hook should generate the readme, that is then committed by the dev. If the CI pipeline makes changes to the readme, it should fail.

I like this project a lot as it is more fully featured than https://github.com/norwoodj/helm-docs, but I will stick to that one simply for the convenience of the pre-commit hook.

fmulero commented 9 months ago

Hi @martimors, sorry about the very late response.

It seems there was a misunderstood. I think you are asking for a plugin or addon for the pre-commit framework and not just a git pre-commit hook.

I think this is a very interesting and useful feature that could help us to gain more users but unfortunately we are a small team and we don't have enough bandwith. I'll keep the task on-hold and we'll try to do our best. Any PR is welcome and we'll be happy to review it.