Two Git hooks block direct commits of published: true to main without a PR or review, but 26 test cases still find bypasses
11/30/2026
This is a hands-on test report: the author uses two Git hooks, pre-commit and pre-push, to try to prevent published: true from being committed directly to main through local Git operations without a PR or review. Of 26 scenarios, direct commits and spelling variants such as True were blocked; skipping only the commit with --no-verify and then pushing to main was blocked by pre-push, but skipping both the commit and the push with --no-verify got through, as did clones without the hooks installed and updates that bypass local Git. The article also explains that the hooks only inspect local Git, and speculates that updating main directly through the GitHub web UI, API, or CLI would not be blocked, while noting that this case was not verified.