Skip to main content

此版本的 GitHub Enterprise 已停止服务 2022-06-03. 即使针对重大安全问题,也不会发布补丁。 要获得更好的性能、改进的安全性和新功能,请升级到 GitHub Enterprise 的最新版本。 如需升级方面的帮助,请联系 GitHub Enterprise 支持

About webhooks

Learn the basics of how webhooks work to help you build and set up integrations.

Webhooks allow you to build or set up integrations, such as GitHub 应用程序 or OAuth 应用程序, 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).

Events

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

For a complete list of available webhook events and their payloads, see "Webhook events and payloads."

Ping event

当您创建新的 web 挂钩时,我们将向您发送一个简单的 ping 事件,让您知道您已正确设置 web 挂钩。 此事件不会存储,� 此� 法通过事件 API 端点检索它。

For more information about the ping event webhook payload, see the ping event.