Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Add a pre-commit hook to check whether API docs are updated #18820
This PR is an alternative to #18657 Instead of automatically adding files to the commit (which could be problematic) this goes the route of checking whether the API docs are unstaged: if so, the commit will be prevented and the user has the choice of either adding them to the commit or skipping the check.
The expected result is that you can't commit due to the unstaged README files that were auto-updated due to the code change and will see a message like: