Skip to content

Updates hooks section to mention rulesets #784

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

Merged
merged 1 commit into from
May 12, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions pre-receive-hooks/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## Pre-receive hooks

> [!IMPORTANT]
> Many of the hooks mentioned in this article can now be natively implemented through GitHub Enterprise's [Rulesets](https://docs.github.com/en/[email protected]/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/about-rulesets) and [Secret Protection](https://docs.github.com/en/[email protected]/code-security/secret-scanning/introduction/about-secret-scanning) (requires GitHub Advanced Security) features. With it, you have the same effect as hooks, but in a more controlled, auditable and performant fashion, so we highly recommend looking at these before you implement pre-receive hooks.

### tl;dr

This directory contains examples for [pre-receive hooks ](https://help.github.com/enterprise/user/articles/working-with-pre-receive-hooks/) which are a [GitHub Enterprise feature](https://developer.github.com/v3/enterprise/pre_receive_hooks/) to block unwanted commits before they even reach your repository.
Expand Down
Loading