Skip to main content

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

Managing global webhooks

You can configure global webhooks to notify external web servers when events occur within your enterprise.

Who can use this feature

Enterprise owners can manage global webhooks for an enterprise account.

About global webhooks

You can use global webhooks to notify an external web server when events occur within your enterprise. You can configure the server to receive the webhook's payload, then run an application or code that monitors, responds to, or enforces rules for user and organization management for your enterprise. For more information, see "Webhooks."

For example, you can configure your GitHub Enterprise Server instance to send a webhook when someone creates, deletes, or modifies a repository or organization within your enterprise. You can configure the server to automatically perform a task after receiving the webhook.

List of global webhooks

您也可以使用 GitHub Enterprise Server APIs 来管理全局 web 挂钩。 有关操作的完整列表,请参阅“全局 Webhook”。

Adding a global webhook

  1. 在 GitHub Enterprise Server 的右上角,单击� 的个人资料照片,然后单击“企业设置”。 GitHub Enterprise Server 上个人资料照片下拉菜单中的“企业设置”

  2. 在企业帐户侧边� �中,单击 “设置”。 企业帐户侧边� �中的“设置”选项卡

  3. 在“ 设置”下,单击“挂钩”。 企业帐户设置边� �中的“挂钩”选项卡

  4. Click Add webhook. Add webhook button on Webhooks page in Admin center

  5. Type the URL where you'd like to receive payloads. Field to type a payload URL

  6. Optionally, use the Content type drop-down menu, and click a payload format. Drop-down menu listing content type options

  7. Optionally, in the Secret field, type a string to use as a secret key. Field to type a string to use as a secret key

  8. Optionally, if your payload URL is HTTPS and you would not like GitHub Enterprise Server to verify SSL certificates when delivering payloads, select Disable SSL verification. Read the information about SSL verification, then click I understand my webhooks may not be secure. Checkbox for disabling SSL verification

    Warning: SSL verification helps ensure that hook payloads are delivered securely. We do not recommend disabling SSL verification.

  9. Decide if you'd like this webhook to trigger for every event or for selected events. Radio buttons with options to receive payloads for every event or selected events

    • For every event, select Send me everything.
    • To choose specific events, select Let me select individual events.
  10. If you chose to select individual events, select the events that will trigger the webhook.

    Checkboxes for individual global webhook events

  11. Confirm that the Active checkbox is selected. Selected Active checkbox

  12. Click Add webhook.

Editing a global webhook

  1. 在 GitHub Enterprise Server 的右上角,单击� 的个人资料照片,然后单击“企业设置”。 GitHub Enterprise Server 上个人资料照片下拉菜单中的“企业设置”
  2. 在企业帐户侧边� �中,单击 “设置”。 企业帐户侧边� �中的“设置”选项卡
  3. 在“ 设置”下,单击“挂钩”。 企业帐户设置边� �中的“挂钩”选项卡
  4. Next to the webhook you'd like to edit, click Edit. Edit button next to a webhook
  5. Update the webhook's settings.
  6. Click Update webhook.

Deleting a global webhook

  1. 在 GitHub Enterprise Server 的右上角,单击� 的个人资料照片,然后单击“企业设置”。 GitHub Enterprise Server 上个人资料照片下拉菜单中的“企业设置”
  2. 在企业帐户侧边� �中,单击 “设置”。 企业帐户侧边� �中的“设置”选项卡
  3. 在“ 设置”下,单击“挂钩”。 企业帐户设置边� �中的“挂钩”选项卡
  4. Next to the webhook you'd like to delete, click Delete. Delete button next to a webhook
  5. Read the information about deleting a webhook, then click Yes, delete webhook. Pop-up box with warning information and button to confirm deleting the webhook

Viewing recent deliveries and responses

  1. 在 GitHub Enterprise Server 的右上角,单击� 的个人资料照片,然后单击“企业设置”。 GitHub Enterprise Server 上个人资料照片下拉菜单中的“企业设置”
  2. 在企业帐户侧边� �中,单击 “设置”。 企业帐户侧边� �中的“设置”选项卡
  3. 在“ 设置”下,单击“挂钩”。 企业帐户设置边� �中的“挂钩”选项卡
  4. In the list of webhooks, click the webhook for which you'd like to see deliveries. List of webhooks with links to view each webhook
  5. Under "Recent deliveries", click a delivery to view details. List of the webhook's recent deliveries with links to view details