我们经常发布文档更新,此页面的翻译可能仍在进行中。有关最新信息,请访问英文文档。如果此页面上的翻译有问题,请告诉我们

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

Testing webhooks

Review your webhook deliveries on GitHub, including the HTTP Request and payload as well as the response.

本文内容

Now that you've configured your local server, you might be interested in pushing your code to the limits. To that end, GitHub's webhooks view provides some tooling for testing your deployed payloads.

Listing recent deliveries

Every webhook has its own "Recent Deliveries" section, which lists, at a glance whether a delivery was successful (green check) or failed (red x). You can also identify when each delivery was attempted.

GitHub Enterprise Server keeps a log of each webhook delivery for 8 days.

最近交付视图

Digging into results

By expanding an individual delivery, you'll be able to witness precisely what information GitHub is attempting to send to your server. This includes both the HTTP Request and Response.

Request

The webhook delivery view provides information on which Headers were sent by GitHub. It also includes details about the JSON payload.

Viewing a payload request

响应

The response tab lists how your server replied once it received the payload from GitHub. This includes the status code, the headers, and any additional data within the response body.

查看有效负载响应