v50

latestOpenAPI 3.0.3MITraw.githubusercontent.com2023-07-147873273.9 MB
enterprise-admin

Create a pre-receive hook

post/admin/pre-receive-hooks

Request body

namestring required

The name of the hook.

scriptstring required

The script that the hook runs.

script_repositoryobject required

The GitHub repository where the script is kept.

environmentobject required

The pre-receive environment where the script is executed.

enforcementstring

The state of enforcement for this hook. default: disabled

allow_downstream_configurationboolean

Whether enforcement can be overridden at the org or repo level. default: false

Response

Response

idinteger
namestring
enforcementstring
scriptstring
allow_downstream_configurationboolean