This page was generated based on Github’s Documentation. See our welcome page for context and details.

Github Event delete #

Github Action Trigger #


Webhook event payloadActivity typesGITHUB_SHAGITHUB_REF
deleteNot applicableLast commit on default branchDefault branch

Note: This event will only trigger a workflow run if the workflow file is on the default branch.

Note: An event will not be created when you delete more than three tags at once.

Runs your workflow when someone deletes a Git reference (Git branch or tag) in the workflow’s repository. For information about the APIs to delete a Git reference, see “Mutations” in the GraphQL API documentation or “REST API endpoints for Git database.”

For example, you can run a workflow when the delete event occurs.


Event Payload #


This event occurs when a Git branch or tag is deleted. To subscribe to all pushes to a repository, including branch and tag deletions, use the push webhook event.

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

Note: This event will not occur when more than three tags are deleted at once.


An enterprise on GitHub. Webhook payloads contain the enterprise property when the webhook is configured on an enterprise account or an organization that’s part of an enterprise account. For more information, see “About enterprise accounts."


The GitHub App installation. Webhook payloads contain the installation property when the event is configured for and sent to a GitHub App. For more information, see “Using webhooks with GitHub Apps."


A GitHub organization. Webhook payloads contain the organization property when the webhook is configured for an organization, or when the event occurs from activity in a repository owned by an organization.


The pusher type for the event. Can be either user or a deploy key.


The git ref resource.

github.event.ref_typetag, branchrequired

The type of Git ref object deleted in the repository.


The repository on GitHub where the event occurred. Webhook payloads contain the repository property when the event occurs from activity in a repository.


The GitHub user that triggered the event. This property is included in every webhook payload.