-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add "API Docs" GitHub Action to check if docs are up to date #324
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me!
@mahalrs We should add this step to contributors/developers docs as well |
You mean checking if contributors/developers docs are up to date OR adding a note to contributors/developers docs that they must run |
The latter |
Codecov Report
@@ Coverage Diff @@
## main #324 +/- ##
=======================================
Coverage 23.24% 23.24%
=======================================
Files 12 12
Lines 783 783
=======================================
Hits 182 182
Misses 594 594
Partials 7 7 Continue to review full report at Codecov.
|
Done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks awesome!
Closes: #311
This change add a GitHub Action to check if API docs are up to date. If not, this check will fail and you should run
make api-docs
before pushing your changes (similar to golangci lint check).NOTE 1:
Since the main branch is protected, Github action cannot use regular GITHUB_TOKEN, it needs special privileges. But if we create a Personal Access Token with write access, any collaborator can make changes to the workflow and can misuse the token.
So we should create a required check (similar to e2e, golangci-lint) to see if api docs are up to date. If not, this check will fail and the person making the PR (or pushing directly to main) should run
make api-docs
to update the docs before pushing/merging changes.@nitishm @jonathan-innis Let me know if you have any suggestions such as if there is a way collaborators can't misuse the token by making changes to workflow action.
NOTE 2:
This check will fail because I have added a line to ./docs/api.md that makes docs outdated. So, I must run
make api-docs
and push new changes to pass all checks.EDIT: Updated api docs by running
make api-docs
locally and committed new changes. Now API Docs check should pass.