Branch Protection Rule

This event occurs when there is activity relating to branch protection rules. For more information, see "About protected branches." For information about the APIs to manage branch protection rules, see the GraphQL documentation or "Branch protection" in the REST API documentation.

Actions

ActionSent when
createdA branch protection rule was created.
deletedA branch protection rule was deleted.
editedA branch protection rule was edited.

Payload

Fields of the delivery for the first action above. Every action shares the event's core fields.

FieldTypeRequiredDescription
actionstringYes
enterpriseobjectNoAn enterprise on GitHub. Webhook payloads contain the enterprise property when the webhook is configured
installationobjectNoThe GitHub App installation. Webhook payloads contain the installation property when the event is configured
organizationobjectNoA GitHub organization. Webhook payloads contain the organization property when the webhook is configured for an
repositoryobjectYesThe repository on GitHub where the event occurred. Webhook payloads contain the repository property
ruleobjectYesThe branch protection rule. Includes a name and all the branch protection settings applied to branches that match the name. Binary settings are boolean. Multi-level configurations are one of off, non_admins, or everyone. Actor and build lists are arrays of strings.
senderobjectYesA GitHub user.
Subscribing

To subscribe to this event, a GitHub App must have at least read-level access for the "Administration" repository permission.