helm-docs
helm-docs copied to clipboard
[Feature request] Argument to checks if the documentation is up-to-date
It would be nice to have an argument which allows running helm-docs for checking if README is up-to-date. Such argument is very handy in CI workflows when you just need to check if the documentation is relevant, not to update it.
Here's how it might look like:
Running helm-docs in repo with up-to-date readme
$ helm-docs --check
Up-to-date
$ echo $?
0
Running helm-docs in repo with outdated readme
$ helm-docs --check
README needs to be updated
$ echo $?
2
I would also like to see this. We're using git to check if anything changed, but ideally the exit code would work for this.
name: Docs check
on: pull_request
defaults:
run:
shell: bash
jobs:
docs-check:
runs-on: [self-hosted, Linux, X64]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Ensure documentation is updated
uses: docker://jnorwood/helm-docs:latest
- name: Check for changes
run: |
if git diff --exit-code; then
echo -e "\n####### Git is clean\n"
else
git status
echo -e "\n####### Git changes detected! Check and commit changes !!!\n"
exit 1
fi
Might be a good thing to check for it. Will add on the list to look further into it.
Do you need any help with this @Nepo26? I'd really like to have this and I'd be happy to pitch in if you need the help
Yes, I would like some help @jhoover4. Can you check if this falls under the same function of strict mode? If not, can you provide some examples of how do you think this function should work? I don't think a README needs to be updated
is enough, this probably can be more verbose.
Yeah I'm honestly not sure if we need this after we include strict mode. If strict mode is on and you dont want an aspect documented, you should just need to put @ignore
right? I think we should focus more on making sure all the corner cases in strict mode are good.
From there maybe we could add a part in the README saying you can achieve this by turning on strict mode and making sure everything is commented or has an @ignore