create

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

Github Event create #

Github Action Trigger #

source

Webhook event payloadActivity typesGITHUB_SHAGITHUB_REF
createNot applicableLast commit on the created branch or tagBranch or tag created

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

Runs your workflow when someone creates a Git reference (Git branch or tag) in the workflow’s repository. For information about the APIs to create 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 create event occurs.

on:
  create

Event Payload #

source

This event occurs when a Git branch or tag is created.

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

Notes:

  • This event will not occur when more than three tags are created at once.
  • Payloads are capped at 25 MB. If an event generates a larger payload, GitHub will not deliver a payload for that webhook event. This may happen, for example, if many branches or tags are pushed at once. We suggest monitoring your payload size to ensure delivery.
fieldtyperequireddescription
github.event.descriptionstring or nullrequired

The repository’s current description.

github.event.enterpriseobjectoptional

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."

github.event.installationobjectoptional

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."

github.event.master_branchstringrequired

The name of the repository’s default branch (usually main).

github.event.organizationobjectoptional

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.

github.event.pusher_typestringrequired

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

github.event.refstringrequired

The git ref resource.

github.event.ref_typetag, branchrequired

The type of Git ref object created in the repository.

github.event.repositoryobjectrequired

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

github.event.senderobjectrequired

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