Closed justincoh closed 1 month ago
✨ nice!
We have a github action check for this scenario
I wonder if maybe the github action we have today can reuse the same logic introduced in the precommit script?
I deleted my comment b/c realized we're not modifying the github action in this PR.
In a follow up PR, can you fix that?
https://github.com/openfga/api/blob/main/.github/workflows/review.yaml#L33-L36
We don't need to limit to docs and protos, any change anywhere should error.
(not a big issue b/c at the moment, we're not likely to modify those files, but if that changes or e.g. someone updates go.mod manually and keeps go.sum not updated)
Description
When updating a proto file last week, I forgot to update the docs. We have a github action check for this scenario but it's annoying to have to wait for such a simple fix.
This PR adds a ~non~ blocking pre-commit hook to remind the author if the docs or generated files need updating.
It does the following:
.proto
file is being committed/docs
and/proto/openfga/
folder are also being committed/docs
and/proto/openfga/
are being committed, hook exits successfullyhttps://github.com/user-attachments/assets/c9e710f2-47f9-4d78-ba9e-947879e9754d