This page was generated based on Github’s Documentation. See our welcome page for context and details.
Github Event watch
#
Github Action Trigger #
Webhook event payload | Activity types | GITHUB_SHA | GITHUB_REF |
---|---|---|---|
watch | - started | Last commit on default branch | Default branch |
Note: More than one activity type triggers this event. Although only the started
activity type is supported, specifying the activity type will keep your workflow specific if more activity types are added in the future. For information about each activity type, see “Webhook events and payloads.” By default, all activity types trigger workflows that run on this event. You can limit your workflow runs to specific activity types using the types
keyword. For more information, see “Workflow syntax for GitHub Actions.”
Note: This event will only trigger a workflow run if the workflow file is on the default branch.
Runs your workflow when the workflow’s repository is starred. For information about the pull request APIs, see “Mutations” in the GraphQL API documentation or “REST API endpoints for activity.”
For example, you can run a workflow when someone stars a repository, which is the started
activity type for a watch event.
on:
watch:
types: [started]
Event Payload #
Activities: started
Common Fields #
These fields are common to every event types available with this trigger.
field | type | required | description |
---|---|---|---|
github.event.action | started | required | |
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.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. |
started
#
This event occurs when there is activity relating to watching, or subscribing to, a repository. For more information about watching, see "Managing your subscriptions." For information about the APIs to manage watching, see "Watching" in the REST API documentation.
To subscribe to this event, a GitHub App must have at least read-level access for the "Metadata" repository permission.
field | type | required | description |
---|