-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Revert "[Tiny PR] Add updated README files during precommit" #18735
Conversation
This reverts commit 0aee2f7.
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.
We can work it out separately 👍
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.
Thanks for fixing this so quickly 😄
A few thoughts:
Given this, I'd go for writing a pre-commit hook that prevents you from committing if there are uncommitted changes to documentation. Does this sound good? I can prepare something in the coming days if this is the direction we want to go. |
That sounds great! Thank you! |
Why not just build the docs for staged changes only? We can stash the other changes while building. |
I thought about this as well. If it was only for files that are staged whole that'd be great. Unfortunately, that assumption is not true in a lot of cases: staging only a part of a file is something that I regularly do and I've seen other people doing as well. At that point, building the docs for staged changes gets more complicated and covering that use case would be an order of magnitude more complex (if not more). I believe we can get a bigger return of investment with the pre-commit hook. |
That makes sense. Thanks for clarifying! 😄 |
It looks like husky, the package we use to run git hooks, was updated to the v3 line by #17310, which means it requires git > 2.13.2. My OS bundles a lower git version, so I've just realized that existing hooks don't work for me (lint, auto doc generation, etc). I guess if we haven't had reports for this it in the past couple of months it means that the issue isn't widespread and people do have a compatible git version. What a lovely way to start this task, though. |
Reverts #18657.
I don't know how to fix the problem. It's super annoying that the recommit hook creates changes though.
docgen
command.docgen
changed any files so the changes can be added manually.@nosolosw, do you have any idea on how to approach this?
In the meantime this PR reverts #18657.