Webhooks allow you to build or set up integrations, such as GitHub 应用程序s or OAuth 应用程序s, which subscribe to certain events on GitHub.com. When one of those events is triggered, we'll send a HTTP POST payload to the webhook's configured URL. Webhooks can be used to update an external issue tracker, trigger CI builds, update a backup mirror, or even deploy to your production server. You're only limited by your imagination.
Webhooks can be installed on GitHub Enterprise, an organization, a specific repository, or a GitHub 应用程序. Once installed, the webhook will be sent each time one or more subscribed events occurs.
You can create up to 250 webhooks for each event on each installation target (GitHub Enterprise Server instance, specific organization, or specific repository).
事件
配置 web 挂钩时,您可以使用 UI 或 API 选择哪些事件将向您发送有效负载。 仅订阅您计划处理的特定事件可限制对服务器的 HTTP 请求数。 您也可以订阅所有当前和未来的事件。 默认情况下,web 挂钩只订阅推送事件。 您可以随时更改订阅事件的列表。
Each event corresponds to a certain set of actions that can happen to your organization and/or repository. For example, if you subscribe to the issues
event you'll receive detailed payloads every time an issue is opened, closed, labeled, etc.
See "Webhook event payloads" for the list of available webhook events and their payloads.
Ping event
当您创建新的 web 挂钩时,我们将向您发送一个简单的 ping
事件,让您知道您已正确设置 web 挂钩。 This event isn't stored so it isn't retrievable via the Events API endpoint.
For more information about the ping
event webhook payload, see the ping
event.