fork

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

Github Event fork #

Github Action Trigger #

source

Webhook event payloadActivity typesGITHUB_SHAGITHUB_REF
forkNot applicableLast commit on default branchDefault branch

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

Runs your workflow when someone forks a repository. For information about the REST API, see “REST API endpoints for repositories.”

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

on:
  fork

Event Payload #

source

This event occurs when someone forks a repository. For more information, see "Fork a repo." For information about the API to manage forks, see "Forks" in the REST API documentation.

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

fieldtyperequireddescription
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.forkeeobjectrequired

The created repository resource.

github.event.forkee.allow_auto_mergebooleanoptional

Whether to allow auto-merge for pull requests.

github.event.forkee.allow_forkingbooleanoptional
github.event.forkee.allow_merge_commitbooleanoptional

Whether to allow merge commits for pull requests.

github.event.forkee.allow_rebase_mergebooleanoptional

Whether to allow rebase merges for pull requests.

github.event.forkee.allow_squash_mergebooleanoptional

Whether to allow squash merges for pull requests.

github.event.forkee.allow_update_branchbooleanoptional
github.event.forkee.archive_urlstringrequired
github.event.forkee.archivedbooleanrequired

Whether the repository is archived.

github.event.forkee.assignees_urlstringrequired
github.event.forkee.blobs_urlstringrequired
github.event.forkee.branches_urlstringrequired
github.event.forkee.clone_urlstringrequired
github.event.forkee.collaborators_urlstringrequired
github.event.forkee.comments_urlstringrequired
github.event.forkee.commits_urlstringrequired
github.event.forkee.compare_urlstringrequired
github.event.forkee.contents_urlstringrequired
github.event.forkee.contributors_urlstringrequired
github.event.forkee.created_atinteger or stringrequired
github.event.forkee.custom_propertiesobjectoptional

The custom properties that were defined for the repository. The keys are the custom property names, and the values are the corresponding custom property values.

github.event.forkee.default_branchstringrequired

The default branch of the repository.

github.event.forkee.delete_branch_on_mergebooleanoptional

Whether to delete head branches when pull requests are merged

github.event.forkee.deployments_urlstringrequired
github.event.forkee.descriptionstring or nullrequired
github.event.forkee.disabledbooleanoptional
github.event.forkee.downloads_urlstringrequired
github.event.forkee.events_urlstringrequired
github.event.forkee.forkbooleanrequired
github.event.forkee.forksintegerrequired
github.event.forkee.forks_countintegerrequired
github.event.forkee.forks_urlstringrequired
github.event.forkee.full_namestringrequired
github.event.forkee.git_commits_urlstringrequired
github.event.forkee.git_refs_urlstringrequired
github.event.forkee.git_tags_urlstringrequired
github.event.forkee.git_urlstringrequired
github.event.forkee.has_downloadsbooleanrequired

Whether downloads are enabled.

github.event.forkee.has_issuesbooleanrequired

Whether issues are enabled.

github.event.forkee.has_pagesbooleanrequired
github.event.forkee.has_projectsbooleanrequired

Whether projects are enabled.

github.event.forkee.has_wikibooleanrequired

Whether the wiki is enabled.

github.event.forkee.homepagestring or nullrequired
github.event.forkee.hooks_urlstringrequired
github.event.forkee.html_urlstringrequired
github.event.forkee.idintegerrequired

Unique identifier of the repository

github.event.forkee.is_templatebooleanoptional
github.event.forkee.issue_comment_urlstringrequired
github.event.forkee.issue_events_urlstringrequired
github.event.forkee.issues_urlstringrequired
github.event.forkee.keys_urlstringrequired
github.event.forkee.labels_urlstringrequired
github.event.forkee.languagestring or nullrequired
github.event.forkee.languages_urlstringrequired
github.event.forkee.licenseobject or nullrequired
github.event.forkee.license.keystringrequired
github.event.forkee.license.namestringrequired
github.event.forkee.license.node_idstringrequired
github.event.forkee.license.spdx_idstringrequired
github.event.forkee.license.urlstring or nullrequired
github.event.forkee.master_branchstringoptional
github.event.forkee.merges_urlstringrequired
github.event.forkee.milestones_urlstringrequired
github.event.forkee.mirror_urlstring or nullrequired
github.event.forkee.namestringrequired

The name of the repository.

github.event.forkee.node_idstringrequired
github.event.forkee.notifications_urlstringrequired
github.event.forkee.open_issuesintegerrequired
github.event.forkee.open_issues_countintegerrequired
github.event.forkee.organizationstringoptional
github.event.forkee.ownerobject or nullrequired
github.event.forkee.owner.avatar_urlstringoptional
github.event.forkee.owner.deletedbooleanoptional
github.event.forkee.owner.emailstring or nulloptional
github.event.forkee.owner.events_urlstringoptional
github.event.forkee.owner.followers_urlstringoptional
github.event.forkee.owner.following_urlstringoptional
github.event.forkee.owner.gists_urlstringoptional
github.event.forkee.owner.gravatar_idstringoptional
github.event.forkee.owner.html_urlstringoptional
github.event.forkee.owner.idintegerrequired
github.event.forkee.owner.loginstringrequired
github.event.forkee.owner.namestringoptional
github.event.forkee.owner.node_idstringoptional
github.event.forkee.owner.organizations_urlstringoptional
github.event.forkee.owner.received_events_urlstringoptional
github.event.forkee.owner.repos_urlstringoptional
github.event.forkee.owner.site_adminbooleanoptional
github.event.forkee.owner.starred_urlstringoptional
github.event.forkee.owner.subscriptions_urlstringoptional
github.event.forkee.owner.typeBot, User, Organizationoptional
github.event.forkee.owner.urlstringoptional
github.event.forkee.permissionsobjectoptional
github.event.forkee.permissions.adminbooleanrequired
github.event.forkee.permissions.maintainbooleanoptional
github.event.forkee.permissions.pullbooleanrequired
github.event.forkee.permissions.pushbooleanrequired
github.event.forkee.permissions.triagebooleanoptional
github.event.forkee.privatebooleanrequired

Whether the repository is private or public.

github.event.forkee.publicbooleanoptional
github.event.forkee.pulls_urlstringrequired
github.event.forkee.pushed_atnull or integer or stringrequired
github.event.forkee.releases_urlstringrequired
github.event.forkee.role_namestring or nulloptional
github.event.forkee.sizeintegerrequired
github.event.forkee.ssh_urlstringrequired
github.event.forkee.stargazersintegeroptional
github.event.forkee.stargazers_countintegerrequired
github.event.forkee.stargazers_urlstringrequired
github.event.forkee.statuses_urlstringrequired
github.event.forkee.subscribers_urlstringrequired
github.event.forkee.subscription_urlstringrequired
github.event.forkee.svn_urlstringrequired
github.event.forkee.tags_urlstringrequired
github.event.forkee.teams_urlstringrequired
github.event.forkee.topicsarray of stringsrequired
github.event.forkee.trees_urlstringrequired
github.event.forkee.updated_atstringrequired
github.event.forkee.urlstringrequired
github.event.forkee.visibilitypublic, private, internalrequired
github.event.forkee.watchersintegerrequired
github.event.forkee.watchers_countintegerrequired
github.event.forkee.web_commit_signoff_requiredbooleanoptional

Whether to require contributors to sign off on web-based commits

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