Are you sure you want to delete this access key?
title | intro | redirect_from | versions | type | topics |
---|---|---|---|---|---|
About pre-receive hooks | *Pre-receive hooks* are scripts that run on the {% data variables.product.prodname_ghe_server %} appliance that you can use to implement quality checks. | [/enterprise/admin/developer-workflow/about-pre-receive-hooks /enterprise/admin/policies/about-pre-receive-hooks /admin/policies/about-pre-receive-hooks] | [{enterprise-server *}] | overview | [Enterprise Policies Pre-receive hooks] |
When a push occurs, each script runs in an isolated environment and can perform checks on the content of the push. The scripts will cause the push to be accepted if the exit status is 0, or rejected if the exit status is non-zero.
Use pre-receive hooks to satisfy business rules, enforce regulatory compliance, and prevent certain common mistakes.
Examples of how you can use pre-receive hooks:
Impact to developers and their workflows can be significant and must be considered carefully. Pre-receive hooks that are based on business needs and implemented thoughtfully will provide the most benefit to the organization as a whole.
Pre-receive hooks can have unintended effects on the performance of {% data variables.product.product_location %} and should be carefully implemented and reviewed.
Press p or to see the previous file or, n or to see the next file
Are you sure you want to delete this access key?
Are you sure you want to delete this access key?
Are you sure you want to delete this access key?
Are you sure you want to delete this access key?