Skip to main content

Webhook 事件和有效负载

了解每个 Webhook 事件发生的时间以及有效负载包含的内容。

有关 Webhook 事件和有效负载

您可以创建订阅此页所列事件的 web 挂钩。 若要限制对服务器的 HTTP 请求数,应仅订阅计划处理的特定事件。 有关详细信息,请参阅“创建 web 挂钩”。

此页面上的每个 Webhook 事件都包含该事件的 Webhook 属性的说明。 如果某个事件包含多个操作,则会包含与每个操作对应的属性。

每个事件仅适用于特定类型的 Webhook。 例如,组织 Webhook 可以订阅 team 事件,但存储库 Webhook 无法订阅。 各个 Webhook 事件的说明列出了事件的可用性。 有关详细信息,请参阅“Webhook 的类型”。

有效负载上限

有效负载上限为 25 MB。 如果事件生成的有效负载较大,GitHub 将不会为该 Webhook 事件传递有效负载。 例如,如果同时推送多个分支或标记,这种情况可能会发生在 create 事件中。 我们建议监控有效负载的大小以确保成功递送。

递送标头

递送到 web 挂钩已配置 URL 端点的 HTTP POST 有效负载将包含几个特殊标头:

  • X-GitHub-Hook-ID:Webhook 的唯一标识符。
  • X-GitHub-Event:触发交付的事件名称。
  • X-GitHub-Delivery:用于标识事件的全局唯一标识符 (GUID)。
  • X-Hub-Signature:如果 Webhook 配置了 secret,则会发送此标头。 这是请求正文的 HMAC 十六进制摘要,它是使用 SHA-1 哈希函数和作为 HMAC keysecret 生成的。 提供 X-Hub-Signature 以便与现有集成兼容。 建议改用更加安全的 X-Hub-Signature-256
  • X-Hub-Signature-256:如果 Webhook 配置了 secret,则会发送此标头。 这是请求正文的 HMAC 十六进制摘要,是使用 SHA-256 哈希函数和作为 HMAC keysecret 生成的。 有关详细信息,请参阅“验证 Webhook 交付”。
  • User-Agent:此标头始终具有前缀 GitHub-Hookshot/
  • X-GitHub-Hook-Installation-Target-Type:创建 Webhook 的资源的类型。
  • X-GitHub-Hook-Installation-Target-ID:创建 Webhook 的资源的唯一标识符。

要查看每个标头在 Webhook 有效负载中可能呈现的内容,请参阅“Webhook 传递示例”。

Webhook 传递示例

可以选择将有效负载以 JSON 格式 (application/json) 或作为 URL 编码数据 (x-www-form-urlencoded) 传递。 下面是一个使用 JSON 格式的 Webhook POST 请求的示例。

> POST /payload HTTP/2

> X-GitHub-Delivery: 72d3162e-cc78-11e3-81ab-4c9367dc0958
> X-Hub-Signature: sha1=7d38cdd689735b008b3c702edd92eea23791c5f6
> X-Hub-Signature-256: sha256=d57c68ca6f92289e6987922ff26938930f6e66a2d161ef06abdf1859230aa23c
> User-Agent: GitHub-Hookshot/044aadd
> Content-Type: application/json
> Content-Length: 6615
> X-GitHub-Event: issues
> X-GitHub-Hook-ID: 292430182
> X-GitHub-Hook-Installation-Target-ID: 79929171
> X-GitHub-Hook-Installation-Target-Type: repository

> {
>   "action": "opened",
>   "issue": {
>     "url": "https://api.github.com/repos/octocat/Hello-World/issues/1347",
>     "number": 1347,
>     ...
>   },
>   "repository" : {
>     "id": 1296269,
>     "full_name": "octocat/Hello-World",
>     "owner": {
>       "login": "octocat",
>       "id": 1,
>       ...
>     },
>     ...
>   },
>   "sender": {
>     "login": "octocat",
>     "id": 1,
>     ...
>   }
> }

branch_protection_configuration

This event occurs when there is a change to branch protection configurations for a repository. For more information, see "About protected branches." For information about using the APIs to manage branch protection rules, see "Branch protection rule" in the GraphQL documentation or "Branch protection" in the REST API documentation.

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

branch_protection_configuration 的可用性

  • 存储库
  • 组织
  • GitHub 应用

branch_protection_configuration 的 Webhook 有效负载对象

All branch protections were disabled for a repository.

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

: disabled

enterprise object

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

installation object

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

organization object

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.

repository object 必须

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

sender object 必须

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

branch_protection_rule

This event occurs when there is activity relating to branch protection rules. For more information, see "About protected branches." For information about the APIs to manage branch protection rules, see the GraphQL documentation or "Branch protection" in the REST API documentation.

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

branch_protection_rule 的可用性

  • 存储库
  • 组织
  • GitHub 应用

branch_protection_rule 的 Webhook 有效负载对象

A branch protection rule was created.

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

: created

enterprise object

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

installation object

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

organization object

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.

repository object 必须

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

rule object 必须

The branch protection rule. Includes a name and all the branch protection settings applied to branches that match the name. Binary settings are boolean. Multi-level configurations are one of off, non_admins, or everyone. Actor and build lists are arrays of strings.

sender object 必须

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

bypass_request_push_ruleset

This event occurs when there is activity related to a user's request to bypass a set of push rules.

For more information, see "Managing requests to bypass push rulesets."

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

Note: Delegated bypass for push rules is currently in beta and subject to change.

bypass_request_push_ruleset 的可用性

  • 存储库
  • 组织
  • GitHub 应用

bypass_request_push_ruleset 的 Webhook 有效负载对象

A push ruleset bypass request was cancelled.

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

: cancelled

enterprise object

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

installation object

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

organization object

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.

repository object

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

exemption_request object 必须

A request from a user to be exempted from a set of rules.

sender object 必须

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

bypass_request_secret_scanning

This event occurs when there is activity related to a user's request to bypass secret scanning push protection.

For more information, see "Enabling delegated bypass for push protection."

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

Note: Delegated bypass for push protection is currently in beta and subject to change.

bypass_request_secret_scanning 的可用性

  • 存储库
  • 组织
  • GitHub 应用

bypass_request_secret_scanning 的 Webhook 有效负载对象

A secret scanning push protection bypass request was cancelled.

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

: cancelled

enterprise object

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

installation object

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

organization object

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.

repository object

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

exemption_request object 必须

A request from a user to be exempted from a set of rules.

sender object 必须

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

check_run

This event occurs when there is activity relating to a check run. For information about check runs, see "Getting started with the Checks API." For information about the APIs to manage check runs, see the GraphQL API documentation or "Check Runs" in the REST API documentation.

For activity relating to check suites, use the check-suite event.

To subscribe to this event, a GitHub App must have at least read-level access for the "Checks" repository permission. To receive the rerequested and requested_action event types, the app must have at least write-level access for the "Checks" permission. GitHub Apps with write-level access for the "Checks" permission are automatically subscribed to this webhook event.

Repository and organization webhooks only receive payloads for the created and completed event types in repositories.

Note: The API only looks for pushes in the repository where the check run was created. Pushes to a branch in a forked repository are not detected and return an empty pull_requests array and a null value for head_branch.

check_run 的可用性

  • 存储库
  • 组织
  • GitHub 应用

check_run 的 Webhook 有效负载对象

A check run was completed, and a conclusion is available.

Webhook 请求正文参数
名称, 类型, 说明
action string

: completed

check_run object 必须

A check performed on the code of a given code change

installation object

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

organization object

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.

repository object 必须

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

sender object 必须

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

check_suite

This event occurs when there is activity relating to a check suite. For information about check suites, see "Getting started with the Checks API." For information about the APIs to manage check suites, see the GraphQL API documentation or "Check Suites" in the REST API documentation.

For activity relating to check runs, use the check_run event.

To subscribe to this event, a GitHub App must have at least read-level access for the "Checks" permission. To receive the requested and rerequested event types, the app must have at least write-level access for the "Checks" permission. GitHub Apps with write-level access for the "Checks" permission are automatically subscribed to this webhook event.

Repository and organization webhooks only receive payloads for the completed event types in repositories.

Note: The API only looks for pushes in the repository where the check suite was created. Pushes to a branch in a forked repository are not detected and return an empty pull_requests array and a null value for head_branch.

check_suite 的可用性

  • 存储库
  • 组织
  • GitHub 应用

check_suite 的 Webhook 有效负载对象

All check runs in a check suite have completed, and a conclusion is available.

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

: completed

check_suite object 必须
enterprise object

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

installation object

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

organization object

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.

repository object 必须

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

sender object 必须

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

code_scanning_alert

This event occurs when there is activity relating to code scanning alerts in a repository. For more information, see "About code scanning" and "About code scanning alerts." For information about the API to manage code scanning, see "Code scanning" in the REST API documentation.

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

code_scanning_alert 的可用性

  • 存储库
  • 组织
  • GitHub 应用

code_scanning_alert 的 Webhook 有效负载对象

A previously created code scanning alert appeared in another branch. This can happen when a branch is merged into or created from a branch with a pre-existing code scanning alert.

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

: appeared_in_branch

alert object 必须

The code scanning alert involved in the event.

commit_oid string 必须

The commit SHA of the code scanning alert. When the action is reopened_by_user or closed_by_user, the event was triggered by the sender and this value will be empty.

enterprise object

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

installation object

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

organization object

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.

ref string 必须

The Git reference of the code scanning alert. When the action is reopened_by_user or closed_by_user, the event was triggered by the sender and this value will be empty.

repository object 必须

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

sender object 必须

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

commit_comment

This event occurs when there is activity relating to commit comments. For more information about commit comments, see "Commenting on a pull request." For information about the APIs to manage commit comments, see the GraphQL API documentation or "Commit comments" in the REST API documentation.

For activity relating to comments on pull request reviews, use the pull_request_review_comment event. For activity relating to issue comments, use the issue_comment event. For activity relating to discussion comments, use the discussion_comment event.

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

commit_comment 的可用性

  • 存储库
  • 组织
  • GitHub 应用

commit_comment 的 Webhook 有效负载对象

Someone commented on a commit.

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

The action performed. Can be created.

: created

comment object 必须

The commit comment resource.

enterprise object

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

installation object

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

organization object

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.

repository object 必须

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

sender object 必须

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

create

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.

create 的可用性

  • 存储库
  • 组织
  • GitHub 应用

create 的 Webhook 有效负载对象

Webhook 请求正文参数
名称, 类型, 说明
description string or null 必须

The repository's current description.

enterprise object

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

installation object

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

master_branch string 必须

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

organization object

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.

pusher_type string 必须

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

ref string 必须

The git ref resource.

ref_type string 必须

The type of Git ref object created in the repository.

可以是以下选项之一: tag, branch

repository object 必须

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

sender object 必须

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

custom_property

This event occurs when there is activity relating to a custom property.

For more information, see "Managing custom properties for repositories in your organization". For information about the APIs to manage custom properties, see "Custom properties" in the REST API documentation.

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

custom_property 的可用性

  • 组织
  • GitHub 应用

custom_property 的 Webhook 有效负载对象

A new custom property was created.

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

: created

definition object 必须

Custom property defined on an organization

enterprise object

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

installation object

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

organization object 必须

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.

sender object

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

custom_property_values

This event occurs when there is activity relating to custom property values for a repository.

For more information, see "Managing custom properties for repositories in your organization". For information about the APIs to manage custom properties for a repository, see "Custom properties" in the REST API documentation.

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

custom_property_values 的可用性

  • 存储库
  • 组织
  • GitHub 应用

custom_property_values 的 Webhook 有效负载对象

The custom property values of a repository were updated.

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

: updated

enterprise object

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

installation object

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

repository object 必须

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

organization object 必须

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.

sender object

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

new_property_values array of objects 必须

The new custom property values for the repository.

old_property_values array of objects 必须

The old custom property values for the repository.

delete

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.

delete 的可用性

  • 存储库
  • 组织
  • GitHub 应用

delete 的 Webhook 有效负载对象

Webhook 请求正文参数
名称, 类型, 说明
enterprise object

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

installation object

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

organization object

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.

pusher_type string 必须

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

ref string 必须

The git ref resource.

ref_type string 必须

The type of Git ref object deleted in the repository.

可以是以下选项之一: tag, branch

repository object 必须

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

sender object 必须

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

dependabot_alert

This event occurs when there is activity relating to Dependabot alerts.

For more information about Dependabot alerts, see "About Dependabot alerts." For information about the API to manage Dependabot alerts, see "Dependabot alerts" in the REST API documentation.

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

Note: Webhook events for Dependabot alerts are currently in beta and subject to change.

dependabot_alert 的可用性

  • 存储库
  • 组织
  • GitHub 应用

dependabot_alert 的 Webhook 有效负载对象

A Dependabot alert was automatically closed by a Dependabot auto-triage rule.

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

: auto_dismissed

alert object 必须

A Dependabot alert.

installation object

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

organization object

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.

enterprise object

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

repository object 必须

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

sender object 必须

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

deploy_key

This event occurs when there is activity relating to deploy keys. For more information, see "Managing deploy keys." For information about the APIs to manage deploy keys, see the GraphQL API documentation or "Deploy keys" in the REST API documentation.

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

deploy_key 的可用性

  • 存储库
  • 组织
  • GitHub 应用

deploy_key 的 Webhook 有效负载对象

A deploy key was created.

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

: created

enterprise object

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

installation object

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

key object 必须

The deploy key resource.

organization object

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.

repository object 必须

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

sender object 必须

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

deployment

This event occurs when there is activity relating to deployments. For more information, see "About deployments." For information about the APIs to manage deployments, see the GraphQL API documentation or "Deployments" in the REST API documentation.

For activity relating to deployment status, use the deployment_status event.

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

deployment 的可用性

  • 存储库
  • 组织
  • GitHub 应用

deployment 的 Webhook 有效负载对象

A deployment was created.

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

: created

deployment object 必须
enterprise object

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

installation object

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

organization object

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.

repository object 必须

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

sender object 必须

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

workflow object or null 必须
workflow_run object or null 必须

deployment_protection_rule

This event occurs when there is activity relating to deployment protection rules. For more information, see "Using environments for deployment." For information about the API to manage deployment protection rules, see the REST API documentation.

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

deployment_protection_rule 的可用性

  • GitHub 应用

deployment_protection_rule 的 Webhook 有效负载对象

A deployment protection rule was requested for an environment.

Webhook 请求正文参数
名称, 类型, 说明
action string

: requested

environment string

The name of the environment that has the deployment protection rule.

event string

The event that triggered the deployment protection rule.

deployment_callback_url string

The URL to review the deployment protection rule.

deployment object

A request for a specific ref(branch,sha,tag) to be deployed

pull_requests array of objects
repository object

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

organization object

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.

installation object

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

sender object

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

deployment_review

This event occurs when there is activity relating to deployment reviews. For more information, see "About deployments." For information about the APIs to manage deployments, see the GraphQL API documentation or "Deployments" in the REST API documentation.

For activity relating to deployment creation or deployment status, use the deployment or deployment_status event.

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

deployment_review 的可用性

  • GitHub 应用

deployment_review 的 Webhook 有效负载对象

A deployment review was approved.

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

: approved

approver object
comment string
enterprise object

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

installation object

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

organization object 必须

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.

repository object 必须

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

reviewers array of objects
sender object 必须

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

since string 必须
workflow_job_run object
workflow_job_runs array of objects
workflow_run object or null 必须

deployment_status

This event occurs when there is activity relating to deployment statuses. For more information, see "About deployments." For information about the APIs to manage deployments, see the GraphQL API documentation or "Deployments" in the REST API documentation.

For activity relating to deployment creation, use the deployment event.

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

deployment_status 的可用性

  • 存储库
  • 组织
  • GitHub 应用

deployment_status 的 Webhook 有效负载对象

A new deployment status was created.

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

: created

check_run object or null
deployment object 必须
deployment_status object 必须
enterprise object

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

installation object

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

organization object

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.

repository object 必须

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

sender object 必须

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

workflow object or null
workflow_run object or null

discussion

This event occurs when there is activity relating to a discussion. For more information about discussions, see "GitHub Discussions." For information about the API to manage discussions, see the GraphQL documentation.

For activity relating to a comment on a discussion, use the discussion_comment event.

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

Note: Webhook events for GitHub Discussions are currently in beta and subject to change.

discussion 的可用性

  • 存储库
  • 组织
  • GitHub 应用

discussion 的 Webhook 有效负载对象

A comment on the discussion was marked as the answer.

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

: answered

answer object 必须
discussion object 必须

A Discussion in a repository.

enterprise object

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

installation object

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

organization object

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.

repository object 必须

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

sender object 必须

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

discussion_comment

This event occurs when there is activity relating to a comment on a discussion. For more information about discussions, see "GitHub Discussions." For information about the API to manage discussions, see the GraphQL documentation.

For activity relating to a discussion as opposed to comments on a discussion, use the discussion event.

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

Note: Webhook events for GitHub Discussions are currently in beta and subject to change.

discussion_comment 的可用性

  • 存储库
  • 组织
  • GitHub 应用

discussion_comment 的 Webhook 有效负载对象

A comment on a discussion was created.

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

: created

comment object 必须
discussion object 必须

A Discussion in a repository.

enterprise object

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

installation object

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

organization object

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.

repository object 必须

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

sender object 必须

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

fork

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.

fork 的可用性

  • 企业
  • 存储库
  • 组织
  • GitHub 应用

fork 的 Webhook 有效负载对象

Webhook 请求正文参数
名称, 类型, 说明
enterprise object

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

forkee object 必须

The created repository resource.

installation object

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

organization object

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.

repository object 必须

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

sender object 必须

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

github_app_authorization

This event occurs when a user revokes their authorization of a GitHub App. For more information, see "About apps." For information about the API to manage GitHub Apps, see the GraphQL API documentation or "Apps" in the REST API documentation.

A GitHub App receives this webhook by default and cannot unsubscribe from this event.

Anyone can revoke their authorization of a GitHub App from their GitHub account settings page. Revoking the authorization of a GitHub App does not uninstall the GitHub App. You should program your GitHub App so that when it receives this webhook, it stops calling the API on behalf of the person who revoked the token. If your GitHub App continues to use a revoked access token, it will receive the 401 Bad Credentials error. For details about requests with a user access token, which require GitHub App authorization, see "Authenticating with a GitHub App on behalf of a user."

github_app_authorization 的可用性

  • GitHub 应用

github_app_authorization 的 Webhook 有效负载对象

Someone revoked their authorization of a GitHub App.

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

: revoked

sender object 必须

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

gollum

This event occurs when someone creates or updates a wiki page. For more information, see "About wikis."

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

gollum 的可用性

  • 存储库
  • 组织
  • GitHub 应用

gollum 的 Webhook 有效负载对象

Webhook 请求正文参数
名称, 类型, 说明
enterprise object

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

installation object

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

organization object

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.

pages array of objects 必须

The pages that were updated.

repository object 必须

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

sender object 必须

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

installation

This event occurs when there is activity relating to a GitHub App installation. All GitHub Apps receive this event by default. You cannot manually subscribe to this event.

For more information about GitHub Apps, see "About apps." For information about the APIs to manage GitHub Apps, see the GraphQL API documentation or "Apps" in the REST API documentation.

installation 的可用性

  • GitHub 应用

installation 的 Webhook 有效负载对象

Someone installed a GitHub App on a user or organization account.

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

: created

enterprise object

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

installation object 必须

Installation

organization object

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.

repositories array of objects

An array of repository objects that the installation can access.

repository object

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

requester object or null
sender object 必须

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

installation_repositories

This event occurs when there is activity relating to which repositories a GitHub App installation can access. All GitHub Apps receive this event by default. You cannot manually subscribe to this event.

For more information about GitHub Apps, see "About apps." For information about the APIs to manage GitHub Apps, see the GraphQL API documentation or "Apps" in the REST API documentation.

installation_repositories 的可用性

  • GitHub 应用

installation_repositories 的 Webhook 有效负载对象

A GitHub App installation was granted access to one or more repositories.

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

: added

enterprise object

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

installation object 必须

Installation

organization object

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.

repositories_added array of objects 必须

An array of repository objects, which were added to the installation.

repositories_removed array of objects 必须

An array of repository objects, which were removed from the installation.

repository object

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

repository_selection string 必须

Describe whether all repositories have been selected or there's a selection involved

可以是以下选项之一: all, selected

requester object or null 必须
sender object 必须

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

installation_target

This event occurs when there is activity relating to the user or organization account that a GitHub App is installed on. For more information, see "About apps." For information about the APIs to manage GitHub Apps, see the GraphQL API documentation or "Apps" in the REST API documentation.

installation_target 的可用性

  • GitHub 应用

installation_target 的 Webhook 有效负载对象

Somebody renamed the user or organization account that a GitHub App is installed on.

Webhook 请求正文参数
名称, 类型, 说明
account object 必须
action string 必须

: renamed

changes object 必须
enterprise object

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

installation object 必须

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

organization object

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.

repository object

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

sender object

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

target_type string 必须

issue_comment

This event occurs when there is activity relating to a comment on an issue or pull request. For more information about issues and pull requests, see "About issues" and "About pull requests." For information about the APIs to manage issue comments, see the GraphQL documentation or "Issue comments" in the REST API documentation.

For activity relating to an issue as opposed to comments on an issue, use the issue event. For activity related to pull request reviews or pull request review comments, use the pull_request_review or pull_request_review_comment events. For more information about the different types of pull request comments, see "Working with comments."

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

issue_comment 的可用性

  • 存储库
  • 组织
  • GitHub 应用

issue_comment 的 Webhook 有效负载对象

A comment on an issue or pull request was created.

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

: created

comment object 必须

The comment itself.

enterprise object

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

installation object

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

issue object 必须

The issue the comment belongs to.

organization object

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.

repository object 必须

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

sender object 必须

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

issues

This event occurs when there is activity relating to an issue. For more information about issues, see "About issues." For information about the APIs to manage issues, see the GraphQL documentation or "Issues" in the REST API documentation.

For activity relating to a comment on an issue, use the issue_comment event.

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

issues 的可用性

  • 存储库
  • 组织
  • GitHub 应用

issues 的 Webhook 有效负载对象

An issue was assigned to a user.

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

The action that was performed.

: assigned

assignee object or null
enterprise object

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

installation object

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

issue object 必须

The issue itself.

organization object

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.

repository object 必须

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

sender object 必须

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

label

This event occurs when there is activity relating to labels. For more information, see "Managing labels." For information about the APIs to manage labels, see the GraphQL documentation or "Labels" in the REST API documentation.

If you want to receive an event when a label is added to or removed from an issue, pull request, or discussion, use the labeled or unlabeled action type for the issues, pull_request, or discussion events instead.

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

label 的可用性

  • 存储库
  • 组织
  • GitHub 应用

label 的 Webhook 有效负载对象

A label was created.

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

: created

enterprise object

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

installation object

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

label object 必须
organization object

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.

repository object 必须

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

sender object

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

marketplace_purchase

This event occurs when there is activity relating to a GitHub Marketplace purchase. For more information, see "GitHub Marketplace." For information about the APIs to manage GitHub Marketplace listings, see the GraphQL documentation or "GitHub Marketplace" in the REST API documentation.

marketplace_purchase 的可用性

  • GitHub 市场

marketplace_purchase 的 Webhook 有效负载对象

Someone cancelled a GitHub Marketplace plan, and the last billing cycle has ended. The change will take effect on the account immediately.

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

: cancelled

effective_date string 必须
enterprise object

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

installation object

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

marketplace_purchase object 必须
organization object

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.

previous_marketplace_purchase object
repository object

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

sender object 必须

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

member

This event occurs when there is activity relating to collaborators in a repository. For more information, see "Adding outside collaborators to repositories in your organization." For more information about the API to manage repository collaborators, see the GraphQL API documentation or "Collaborators" in the REST API documentation.

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

member 的可用性

  • 企业
  • 存储库
  • 组织
  • GitHub 应用

member 的 Webhook 有效负载对象

A GitHub user accepted an invitation to a repository.

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

: added

changes object
enterprise object

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

installation object

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

member object or null 必须
organization object

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.

repository object 必须

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

sender object 必须

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

membership

This event occurs when there is activity relating to team membership. For more information, see "About teams." For more information about the APIs to manage team memberships, see the GraphQL API documentation or "Team members" in the REST API documentation.

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

membership 的可用性

  • 组织
  • 企业
  • GitHub 应用

membership 的 Webhook 有效负载对象

An organization member was added to a team.

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

: added

enterprise object

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

installation object

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

member object or null 必须
organization object 必须

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.

repository object

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

scope string 必须

The scope of the membership. Currently, can only be team.

: team

sender object or null 必须
team object 必须

Groups of organization members that gives permissions on specified repositories.

merge_group

This event occurs when there is activity relating to a merge group in a merge queue. For more information, see "Managing a merge queue."

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

merge_group 的可用性

  • GitHub 应用

merge_group 的 Webhook 有效负载对象

Status checks were requested for a merge group. This happens when a merge group is created or added to by the merge queue because a pull request was queued.

When you receive this event, you should perform checks on the head SHA and report status back using check runs or commit statuses.

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

: checks_requested

installation object

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

merge_group object 必须

A group of pull requests that the merge queue has grouped together to be merged.

organization object

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.

repository object

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

sender object

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

meta

This event occurs when there is activity relating to a webhook itself.

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

meta 的可用性

  • GitHub 市场
  • 企业
  • 存储库
  • 组织
  • GitHub 应用

meta 的 Webhook 有效负载对象

The webhook was deleted.

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

: deleted

enterprise object

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

hook object 必须

The modified webhook. This will contain different keys based on the type of webhook it is: repository, organization, business, app, or GitHub Marketplace.

hook_id integer 必须

The id of the modified webhook.

installation object

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

organization object

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.

repository object

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

sender object

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

milestone

This event occurs when there is activity relating to milestones. For more information, see "About milestones." For information about the APIs to manage milestones, see the GraphQL documentation or "Milestones" in the REST API documentation.

If you want to receive an event when an issue or pull request is added to or removed from a milestone, use the milestoned or demilestoned action type for the issues or pull_request events instead.

To subscribe to this event, a GitHub App must have at least read-level access for the "Issues" or "Pull requests" repository permissions.

milestone 的可用性

  • 存储库
  • 组织
  • GitHub 应用

milestone 的 Webhook 有效负载对象

A milestone was closed.

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

: closed

enterprise object

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

installation object

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

milestone object 必须

A collection of related issues and pull requests.

organization object

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.

repository object 必须

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

sender object 必须

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

org_block

This event occurs when organization owners or moderators block or unblock a non-member from collaborating on the organization's repositories. For more information, see "Blocking a user from your organization." For information about the APIs to manage blocked users, see the GraphQL documentation or "Blocking users" in the REST API documentation.

If you want to receive an event when members are added or removed from an organization, use the organization event instead.

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

org_block 的可用性

  • 组织
  • 企业
  • GitHub 应用

org_block 的 Webhook 有效负载对象

A user was blocked from the organization.

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

: blocked

blocked_user object or null 必须
enterprise object

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

installation object

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

organization object 必须

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.

repository object

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

sender object 必须

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

organization

This event occurs when there is activity relating to an organization and its members. For more information, see "About organizations." For information about the APIs to manage organizations, see the GraphQL documentation or "Organizations" in the REST API documentation.

If you want to receive an event when a non-member is blocked or unblocked from an organization, use the org_block event instead.

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

organization 的可用性

  • 组织
  • 企业
  • GitHub 应用

organization 的 Webhook 有效负载对象

An organization was deleted.

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

: deleted

enterprise object

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

installation object

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

membership object

The membership between the user and the organization. Not present when the action is member_invited.

organization object 必须

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.

repository object

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

sender object 必须

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

package

This event occurs when there is activity relating to GitHub Packages. For more information, see "Introduction to GitHub Packages." For information about the APIs to manage GitHub Packages, see the GraphQL API documentation or "Packages" in the REST API documentation.

To install this event on a GitHub App, the app must have at least read-level access for the "Packages" repository permission.

package 的可用性

  • 存储库
  • 组织
  • GitHub 应用

package 的 Webhook 有效负载对象

A package was published to a registry.

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

: published

enterprise object

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

installation object

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

organization object

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.

package object 必须

Information about the package.

repository object

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

sender object 必须

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

page_build

This event occurs when there is an attempted build of a GitHub Pages site. This event occurs regardless of whether the build is successful. For more information, see "Configuring a publishing source for your GitHub Pages site." For information about the API to manage GitHub Pages, see "Pages" in the REST API documentation.

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

page_build 的可用性

  • 存储库
  • 组织
  • GitHub 应用

page_build 的 Webhook 有效负载对象

Webhook 请求正文参数
名称, 类型, 说明
build object 必须
enterprise object

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

id integer 必须
installation object

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

organization object

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.

repository object 必须

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

sender object 必须

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

personal_access_token_request

This event occurs when there is activity relating to a request for a fine-grained personal access token to access resources that belong to a resource owner that requires approval for token access. For more information, see "Creating a personal access token."

To subscribe to this event, a GitHub App must have at least read-level access for the "Personal access token requests" organization permission.

Note: Fine-grained PATs are in public beta. Related APIs, events, and functionality are subject to change.

personal_access_token_request 的可用性

  • GitHub 应用

personal_access_token_request 的 Webhook 有效负载对象

A fine-grained personal access token request was approved.

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

: approved

personal_access_token_request object 必须

Details of a Personal Access Token Request.

enterprise object

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

organization object 必须

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.

sender object 必须

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

installation object 必须

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

ping

This event occurs when you create a new webhook. The ping event is a confirmation from GitHub that you configured the webhook correctly.

ping 的可用性

  • 存储库
  • 组织
  • GitHub 应用
  • 企业
  • GitHub 市场

ping 的 Webhook 有效负载对象

Webhook 请求正文参数
名称, 类型, 说明
hook object

The webhook that is being pinged

hook_id integer

The ID of the webhook that triggered the ping.

organization object

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.

repository object

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

sender object

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

zen string

Random string of GitHub zen.

project_card

This event occurs when there is activity relating to a card on a project (classic). For more information, see "About projects (classic)." For information about the API to manage classic projects, see the GraphQL API documentation or "Projects (classic)" in the REST API documentation.

For activity relating to a project (classic) or a column on a project (classic), use the project and project_column event.

This event relates to projects (classic) only. For activity relating to the new Projects experience, use the projects_v2 event instead.

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

project_card 的可用性

  • 存储库
  • 组织
  • GitHub 应用

project_card 的 Webhook 有效负载对象

A note in a project (classic) was converted to an issue.

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

: converted

changes object 必须
enterprise object

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

installation object

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

organization object

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.

project_card object 必须
repository object

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

sender object 必须

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

project

This event occurs when there is activity relating to a project (classic). For more information, see "About projects (classic)." For information about the API to manage classic projects, see the GraphQL API documentation or "Projects (classic)" in the REST API documentation.

For activity relating to a card or column on a project (classic), use the project_card and project_column event.

This event relates to projects (classic) only. For activity relating to the new Projects experience, use the projects_v2 event instead.

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

project 的可用性

  • 存储库
  • 组织
  • GitHub 应用

project 的 Webhook 有效负载对象

A project (classic) was closed.

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

: closed

enterprise object

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

installation object

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

organization object

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.

project object 必须
repository object

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

sender object 必须

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

project_column

This event occurs when there is activity relating to a column on a project (classic). For more information, see "About projects (classic)." For information about the API to manage classic projects, see the GraphQL API documentation or "Projects (classic)" in the REST API documentation.

For activity relating to a project (classic) or a card on a project (classic), use the project and project_card event.

This event relates to projects (classic) only. For activity relating to the new Projects experience, use the projects_v2 event instead.

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

project_column 的可用性

  • 存储库
  • 组织
  • GitHub 应用

project_column 的 Webhook 有效负载对象

A column was added to a project (classic).

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

: created

enterprise object

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

installation object

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

organization object

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.

project_column object 必须
repository object

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

sender object

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

projects_v2

This event occurs when there is activity relating to an organization-level project. For more information, see "About Projects." For information about the Projects API, see the GraphQL documentation.

For activity relating to a item on a project, use the projects_v2_item event. For activity relating to Projects (classic), use the project, project_card, and project_column events instead.

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

Note: Webhook events for projects are currently in beta and subject to change. To share feedback about projects webhooks with GitHub, see the Projects webhook feedback discussion.

projects_v2 的可用性

  • 组织

projects_v2 的 Webhook 有效负载对象

A project in the organization was closed.

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

: closed

installation object

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

organization object 必须

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.

projects_v2 object 必须

A projects v2 project

sender object 必须

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

projects_v2_item

This event occurs when there is activity relating to an item on an organization-level project. For more information, see "About Projects." For information about the Projects API, see the GraphQL documentation.

For activity relating to a project (instead of an item on a project), use the projects_v2 event. For activity relating to Projects (classic), use the project, project_card, and project_column events instead.

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

Note: Webhook events for projects are currently in beta and subject to change. To share feedback about projects webhooks with GitHub, see the Projects webhook feedback discussion.

projects_v2_item 的可用性

  • 组织

projects_v2_item 的 Webhook 有效负载对象

An item on an organization project was archived. For more information, see "Archiving items from your project."

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

: archived

changes object 必须
installation object

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

organization object 必须

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.

projects_v2_item object 必须

An item belonging to a project

sender object 必须

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

public

This event occurs when repository visibility changes from private to public. For more information, see "Setting repository visibility."

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

public 的可用性

  • 存储库
  • 组织
  • GitHub 应用

public 的 Webhook 有效负载对象

Webhook 请求正文参数
名称, 类型, 说明
enterprise object

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

installation object

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

organization object

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.

repository object 必须

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

sender object 必须

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

pull_request

This event occurs when there is activity on a pull request. For more information, see "About pull requests." For information about the APIs to manage pull requests, see the GraphQL API documentation or "Pulls" in the REST API documentation.

For activity related to pull request reviews, pull request review comments, pull request comments, or pull request review threads, use the pull_request_review, pull_request_review_comment, issue_comment, or pull_request_review_thread events instead.

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

pull_request 的可用性

  • 存储库
  • 组织
  • GitHub 应用

pull_request 的 Webhook 有效负载对象

A pull request was assigned to a user.

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

: assigned

assignee object or null 必须
enterprise object

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

installation object

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

number integer 必须

The pull request number.

organization object

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.

pull_request object 必须
repository object 必须

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

sender object 必须

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

pull_request_review_comment

This event occurs when there is activity relating to a pull request review comment. A pull request review comment is a comment on a pull request's diff. For more information, see "Commenting on a pull request." For information about the APIs to manage pull request review comments, see the GraphQL API documentation or "Pull request review comments" in the REST API documentation.

For activity related to pull request reviews, pull request comments, or pull request review threads, use the pull_request_review, issue_comment, or pull_request_review_thread events instead.

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

pull_request_review_comment 的可用性

  • 存储库
  • 组织
  • GitHub 应用

pull_request_review_comment 的 Webhook 有效负载对象

A comment on a pull request diff was created.

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

: created

comment object 必须

The comment itself.

enterprise object

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

installation object

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

organization object

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.

pull_request object 必须
repository object 必须

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

sender object 必须

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

pull_request_review

This event occurs when there is activity relating to a pull request review. A pull request review is a group of pull request review comments in addition to a body comment and a state. For more information, see "About pull request reviews." For information about the APIs to manage pull request reviews, see the GraphQL API documentation or "Pull request reviews" in the REST API documentation.

For activity related to pull request review comments, pull request comments, or pull request review threads, use the pull_request_review_comment, issue_comment, or pull_request_review_thread events instead.

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

pull_request_review 的可用性

  • 存储库
  • 组织
  • GitHub 应用

pull_request_review 的 Webhook 有效负载对象

A review on a pull request was dismissed.

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

: dismissed

enterprise object

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

installation object

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

organization object

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.

pull_request object 必须
repository object 必须

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

review object 必须

The review that was affected.

sender object 必须

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

pull_request_review_thread

This event occurs when there is activity relating to a comment thread on a pull request. For more information, see "About pull request reviews." For information about the APIs to manage pull request reviews, see the GraphQL API documentation or "Pull request review comments" in the REST API documentation.

For activity related to pull request review comments, pull request comments, or pull request reviews, use the pull_request_review_comment, issue_comment, or pull_request_review events instead.

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

pull_request_review_thread 的可用性

  • 存储库
  • 组织
  • GitHub 应用

pull_request_review_thread 的 Webhook 有效负载对象

A comment thread on a pull request was marked as resolved.

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

: resolved

enterprise object

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

installation object

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

organization object

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.

pull_request object 必须
repository object 必须

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

sender object

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

thread object 必须

push

This event occurs when there is a push to a repository branch. This includes when a commit is pushed, when a commit tag is pushed, when a branch is deleted, when a tag is deleted, or when a repository is created from a template. To subscribe to only branch and tag deletions, use the delete webhook event.

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

Note: Events will not be created if more than 5000 branches are pushed at once. Events will not be created for tags when more than three tags are pushed at once.

push 的可用性

  • 存储库
  • 组织
  • GitHub 应用

push 的 Webhook 有效负载对象

Webhook 请求正文参数
名称, 类型, 说明
after string 必须

The SHA of the most recent commit on ref after the push.

base_ref string or null 必须
before string 必须

The SHA of the most recent commit on ref before the push.

commits array of objects 必须

An array of commit objects describing the pushed commits. (Pushed commits are all commits that are included in the compare between the before commit and the after commit.) The array includes a maximum of 2048 commits. If necessary, you can use the Commits API to fetch additional commits.

compare string 必须

URL that shows the changes in this ref update, from the before commit to the after commit. For a newly created ref that is directly based on the default branch, this is the comparison between the head of the default branch and the after commit. Otherwise, this shows all commits until the after commit.

created boolean 必须

Whether this push created the ref.

deleted boolean 必须

Whether this push deleted the ref.

enterprise object

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

forced boolean 必须

Whether this push was a force push of the ref.

head_commit object or null 必须
installation object

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

organization object

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.

pusher object 必须

Metaproperties for Git author/committer information.

ref string 必须

The full git ref that was pushed. Example: refs/heads/main or refs/tags/v3.14.1.

repository object 必须

A git repository

sender object

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

registry_package

This event occurs when there is activity relating to GitHub Packages. For more information, see "Introduction to GitHub Packages." For information about the APIs to manage GitHub Packages, see the GraphQL API documentation or "Packages" in the REST API documentation.

To install this event on a GitHub App, the app must have at least read-level access for the "Packages" repository permission.

Note: GitHub recommends that you use the newer package event instead.

registry_package 的可用性

  • 存储库
  • 组织
  • GitHub 应用

registry_package 的 Webhook 有效负载对象

A package was published to a registry.

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

: published

enterprise object

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

installation object

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

organization object

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.

registry_package object 必须
repository object

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

sender object 必须

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

release

This event occurs when there is activity relating to releases. For more information, see "About releases." For information about the APIs to manage releases, see the GraphQL API documentation or "Releases" 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.

release 的可用性

  • 存储库
  • 组织
  • GitHub 应用

release 的 Webhook 有效负载对象

A draft was saved, or a release or pre-release was published without previously being saved as a draft.

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

: created

enterprise object

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

installation object

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

organization object

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.

release object 必须

The release object.

repository object 必须

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

sender object 必须

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

repository_advisory

This event occurs when there is activity relating to a repository security advisory. For more information about repository security advisories, see "About GitHub Security Advisories for repositories."

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

repository_advisory 的可用性

  • 存储库
  • 组织
  • GitHub 应用

repository_advisory 的 Webhook 有效负载对象

A repository security advisory was published.

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

: published

enterprise object

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

installation object

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

organization object

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.

repository object 必须

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

repository_advisory object 必须

A repository security advisory.

sender object

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

repository

This event occurs when there is activity relating to repositories. For more information, see "About repositories." For information about the APIs to manage repositories, see the GraphQL documentation or "Repositories" 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.

repository 的可用性

  • 企业
  • 存储库
  • 组织
  • GitHub 应用

repository 的 Webhook 有效负载对象

A repository was archived.

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

: archived

enterprise object

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

installation object

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

organization object

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.

repository object 必须

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

sender object 必须

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

repository_dispatch

This event occurs when a GitHub App sends a POST request to /repos/{owner}/{repo}/dispatches. For more information, see the REST API documentation for creating a repository dispatch event. In the payload, the action will be the event_type that was specified in the POST /repos/{owner}/{repo}/dispatches request body.

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

repository_dispatch 的可用性

  • GitHub 应用

repository_dispatch 的 Webhook 有效负载对象

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

The event_type that was specified in the POST /repos/{owner}/{repo}/dispatches request body.

branch string 必须
client_payload object or null 必须

The client_payload that was specified in the POST /repos/{owner}/{repo}/dispatches request body.

enterprise object

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

installation object 必须

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

organization object

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.

repository object 必须

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

sender object 必须

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

repository_import

This event occurs when a repository is imported to GitHub Enterprise Cloud. For more information, see "Importing a repository with GitHub Importer." For more information about the API to manage imports, see the REST API documentation.

repository_import 的可用性

  • 存储库
  • 组织

repository_import 的 Webhook 有效负载对象

Webhook 请求正文参数
名称, 类型, 说明
enterprise object

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

installation object

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

organization object

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.

repository object 必须

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

sender object 必须

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

status string 必须

可以是以下选项之一: success, cancelled, failure

repository_ruleset

This event occurs when there is activity relating to repository rulesets. For more information about repository rulesets, see "Managing rulesets." For more information on managing rulesets via the APIs, see Repository ruleset in the GraphQL documentation or "Repository rules" and "Organization rules in the REST API documentation."

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

repository_ruleset 的可用性

  • 存储库
  • 组织
  • GitHub 应用

repository_ruleset 的 Webhook 有效负载对象

A repository ruleset was created.

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

: created

enterprise object

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

installation object

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

organization object

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.

repository object

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

repository_ruleset object 必须

A set of rules to apply when specified conditions are met.

sender object 必须

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

repository_vulnerability_alert

This event occurs when there is activity relating to a security vulnerability alert in a repository.

Note: This event is deprecated. Use the dependabot_alert event instead.

repository_vulnerability_alert 的可用性

  • 存储库
  • 组织

repository_vulnerability_alert 的 Webhook 有效负载对象

A repository vulnerability alert was created.

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

: create

alert object 必须

The security alert of the vulnerable dependency.

enterprise object

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

installation object

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

organization object

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.

repository object 必须

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

sender object 必须

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

secret_scanning_alert

This event occurs when there is activity relating to a secret scanning alert. For more information about secret scanning, see "About secret scanning." For information about the API to manage secret scanning alerts, see "Secret scanning" in the REST API documentation.

For activity relating to secret scanning alert locations, use the secret_scanning_alert_location event.

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

secret_scanning_alert 的可用性

  • 存储库
  • 组织
  • GitHub 应用

secret_scanning_alert 的 Webhook 有效负载对象

A secret scanning alert was created.

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

: created

alert object 必须
enterprise object

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

installation object

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

organization object

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.

repository object 必须

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

sender object

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

secret_scanning_alert_location

This event occurs when there is activity relating to the locations of a secret in a secret scanning alert.

For more information about secret scanning, see "About secret scanning." For information about the API to manage secret scanning alerts, see "Secret scanning" in the REST API documentation.

For activity relating to secret scanning alerts, use the secret_scanning_alert event.

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

secret_scanning_alert_location 的可用性

  • 存储库
  • 组织
  • GitHub 应用

secret_scanning_alert_location 的 Webhook 有效负载对象

A new instance of a previously detected secret was detected in a repository, and the location of the secret was added to the existing alert.

Webhook 请求正文参数
名称, 类型, 说明
action string

: created

alert object 必须
installation object

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

location object 必须
organization object

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.

repository object 必须

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

sender object 必须

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

security_advisory

This event occurs when there is activity relating to a global security advisory that was reviewed by GitHub. A GitHub-reviewed global security advisory provides information about security vulnerabilities or malware that have been mapped to packages in ecosystems we support. For more information about global security advisories, see "About global security advisories." For information about the API to manage security advisories, see the REST API documentation or the GraphQL documentation.

GitHub Dependabot alerts are also powered by the security advisory dataset. For more information, see "About Dependabot alerts."

security_advisory 的可用性

  • GitHub 应用

security_advisory 的 Webhook 有效负载对象

A security advisory was published to the GitHub community.

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

: published

enterprise object

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

installation object

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

organization object

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.

repository object

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

security_advisory object 必须

The details of the security advisory, including summary, description, and severity.

sender object

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

security_and_analysis

This event occurs when code security and analysis features are enabled or disabled for a repository. For more information, see "GitHub security features."

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

security_and_analysis 的可用性

  • 存储库
  • 组织
  • GitHub 应用

security_and_analysis 的 Webhook 有效负载对象

Webhook 请求正文参数
名称, 类型, 说明
changes object 必须
enterprise object

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

installation object

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

organization object

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.

repository object 必须

Full Repository

sender object

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

sponsorship

This event occurs when there is activity relating to a sponsorship listing. For more information, see "About GitHub Sponsors." For information about the API to manage sponsors, see the GraphQL documentation.

You can only create a sponsorship webhook on GitHub.com. For more information, see "Configuring webhooks for events in your sponsored account."

sponsorship 的可用性

  • 赞助帐户

sponsorship 的 Webhook 有效负载对象

A sponsorship was cancelled and the last billing cycle has ended.

This event is only sent when a recurring (monthly) sponsorship is cancelled; it is not sent for one-time sponsorships.

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

: cancelled

enterprise object

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

installation object

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

organization object

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.

repository object

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

sender object 必须

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

sponsorship object 必须

star

This event occurs when there is activity relating to repository stars. For more information about stars, see "Saving repositories with stars." For information about the APIs to manage stars, see the GraphQL documentation or "Starring" 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.

star 的可用性

  • 存储库
  • 组织
  • GitHub 应用

star 的 Webhook 有效负载对象

Someone starred a repository.

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

: created

enterprise object

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

installation object

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

organization object

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.

repository object 必须

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

sender object 必须

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

starred_at string or null 必须

The time the star was created. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. Will be null for the deleted action.

status

This event occurs when the status of a Git commit changes. For example, commits can be marked as error, failure, pending, or success. For more information, see "About status checks." For information about the APIs to manage commit statuses, see the GraphQL documentation or "Commit statuses" in the REST API documentation.

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

status 的可用性

  • 存储库
  • 组织
  • GitHub 应用

status 的 Webhook 有效负载对象

Webhook 请求正文参数
名称, 类型, 说明
avatar_url string or null
branches array of objects 必须

An array of branch objects containing the status' SHA. Each branch contains the given SHA, but the SHA may or may not be the head of the branch. The array includes a maximum of 10 branches.

commit object 必须
context string 必须
created_at string 必须
description string or null 必须

The optional human-readable description added to the status.

enterprise object

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

id integer 必须

The unique identifier of the status.

installation object

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

name string 必须
organization object

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.

repository object 必须

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

sender object 必须

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

sha string 必须

The Commit SHA.

state string 必须

The new state. Can be pending, success, failure, or error.

可以是以下选项之一: pending, success, failure, error

target_url string or null 必须

The optional link added to the status.

updated_at string 必须

team_add

This event occurs when a team is added to a repository. For more information, see "Managing teams and people with access to your repository."

For activity relating to teams, see the teams event.

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

team_add 的可用性

  • 存储库
  • 组织
  • GitHub 应用

team_add 的 Webhook 有效负载对象

Webhook 请求正文参数
名称, 类型, 说明
enterprise object

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

installation object

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

organization object

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.

repository object 必须

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

sender object 必须

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

team object 必须

Groups of organization members that gives permissions on specified repositories.

team

This event occurs when there is activity relating to teams in an organization. For more information, see "About teams."

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

team 的可用性

  • 组织
  • 企业
  • GitHub 应用

team 的 Webhook 有效负载对象

A team was granted access to a repository.

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

: added_to_repository

enterprise object

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

installation object

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

organization object 必须

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.

repository object

A git repository

sender object

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

team object 必须

Groups of organization members that gives permissions on specified repositories.

watch

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.

watch 的可用性

  • 存储库
  • 组织
  • GitHub 应用

watch 的 Webhook 有效负载对象

Someone started watching the repository.

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

: started

enterprise object

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

installation object

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

organization object

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.

repository object 必须

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

sender object 必须

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

workflow_dispatch

This event occurs when a GitHub Actions workflow is manually triggered. For more information, see "Manually running a workflow."

For activity relating to workflow runs, use the workflow_run event.

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

workflow_dispatch 的可用性

  • GitHub 应用

workflow_dispatch 的 Webhook 有效负载对象

Webhook 请求正文参数
名称, 类型, 说明
enterprise object

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

inputs object or null 必须
installation object

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

organization object

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.

ref string 必须
repository object 必须

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

sender object 必须

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

workflow string 必须

workflow_job

This event occurs when there is activity relating to a job in a GitHub Actions workflow. For more information, see "Using jobs in a workflow." For information about the API to manage workflow jobs, see "Workflow jobs" in the REST API documentation.

For activity relating to a workflow run instead of a job in a workflow run, use the workflow_run event.

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

workflow_job 的可用性

  • 企业
  • 存储库
  • 组织
  • GitHub 应用

workflow_job 的 Webhook 有效负载对象

A job in a workflow run finished. This event occurs when a job in a workflow is completed, regardless of whether the job was successful or unsuccessful.

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

: completed

enterprise object

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

installation object

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

organization object

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.

repository object 必须

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

sender object 必须

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

workflow_job object 必须
deployment object

A request for a specific ref(branch,sha,tag) to be deployed

workflow_run

This event occurs when there is activity relating to a run of a GitHub Actions workflow. For more information, see "About workflows." For information about the APIs to manage workflow runs, see the GraphQL documentation or "Workflow runs" in the REST API documentation.

For activity relating to a job in a workflow run, use the workflow_job event.

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

workflow_run 的可用性

  • 企业
  • 存储库
  • 组织
  • GitHub 应用

workflow_run 的 Webhook 有效负载对象

A workflow run finished. This event occurs when a workflow run is completed, regardless of whether the workflow was successful or unsuccessful.

Webhook 请求正文参数
名称, 类型, 说明
action string 必须

: completed

enterprise object

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

installation object

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

organization object

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.

repository object 必须

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

sender object 必须

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

workflow object or null 必须
workflow_run object 必须