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 payload | Activity types | GITHUB_SHA | GITHUB_REF |
---|---|---|---|
delete | Not applicable | Last commit on default branch | Default 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.
on:
delete
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.
field | type | required | description |
---|---|---|---|
github.event.enterprise | object | optional | An enterprise on GitHub. Webhook payloads contain the |
github.event.installation | object | optional | The GitHub App installation. Webhook payloads contain the |
github.event.organization | object | optional | A GitHub organization. Webhook payloads contain the |
github.event.pusher_type | string | required | The pusher type for the event. Can be either |
github.event.ref | string | required | The |
github.event.ref_type | tag , branch | required | The type of Git ref object deleted in the repository. |
github.event.repository | object | required | The repository on GitHub where the event occurred. Webhook payloads contain the |
github.event.sender | object | required | The GitHub user that triggered the event. This property is included in every webhook payload. |