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

此版本的 GitHub Enterprise 将停止服务 此版本的 GitHub Enterprise 已停止服务 2019-10-16. 即使针对重大安全问题,也不会发布补丁。 For better performance, improved security, and new features, upgrade to the latest version of GitHub Enterprise. For help with the upgrade, contact GitHub Enterprise support.

管理全局 web 挂钩

站点管理员可以查看、添加、编辑和删除全局 web 挂钩,在实例级别跟踪事件。

您还可以使用 GitHub Enterprise Server API 管理全局 web 挂钩。有关操作的完整列表,请参阅 GitHub 开发者文档中的“全局 web 挂钩”。

添加全局 web 挂钩

  1. In the upper-right corner of any page, click .

    用于访问站点管理员设置的火箭图标

  2. In the left sidebar, click Business.

    Business tab in the Site admin settings

  3. Under your business account's name, click Settings.

    Settings tab on the business account profile page

  4. 在左侧侧边栏中,单击 Hooks

    Hooks tab in the business account settings sidebar

  5. 单击 Add webhook(添加 web 挂钩)

    Webhooks 页面上 Admin center 中的 Add webhook 按钮

  6. 输入您想要接收有效负载的 URL。

    用于输入有效负载 URL 的字段

  7. 或者,使用 Content type 下拉菜单,并单击有效负载格式。

    列出内容类型选项的下拉菜单

  8. 或者,在 Secret 字段中,输入用作 secret 密钥的字符串。

    用于输入用作密钥的字符串的字段

  9. 或者,如果您不希望 GitHub Enterprise Server 在投递有效负载时验证 SSL 证书,请单击 Disable SSL verification。 阅读 SSL 验证的信息,然后单击 I understand my webhooks may not be secure

    用于禁用 SSL 验证的按钮

    警告:SSL 验证有助于确保安全投递挂钩有效负载。 我们不建议禁用 SSL 验证。

  10. 确定您希望此 web 挂钩对每个事件还是选定事件触发:

    包含用于为每个事件或选定事件接收有效负载的选项的单选按钮

    • 对于每个事件,请选择 Send me everything
    • 要选择特定事件,请选择 Let me select individual events
  11. 如果您选择针对各个事件触发,请选择针对组织还是用户活动触发此 web 挂钩。

    组织和用户事件的复选框

  12. 确认已选中 Active 复选框(默认处于选中状态)。

    已选择 Active 复选框

  13. 单击 Add webhook(添加 web 挂钩)

编辑全局 web 挂钩

  1. In the upper-right corner of any page, click .

    用于访问站点管理员设置的火箭图标

  2. In the left sidebar, click Business.

    Business tab in the Site admin settings

  3. Under your business account's name, click Settings.

    Settings tab on the business account profile page

  4. 在左侧侧边栏中,单击 Hooks

    Hooks tab in the business account settings sidebar

  5. 在您想要编辑的 web 挂钩旁,单击 Edit

    web 挂钩旁的 Edit 按钮

  6. 更新 web 挂钩的设置。

  7. 单击 Update webhook

删除全局 web 挂钩

  1. In the upper-right corner of any page, click .

    用于访问站点管理员设置的火箭图标

  2. In the left sidebar, click Business.

    Business tab in the Site admin settings

  3. Under your business account's name, click Settings.

    Settings tab on the business account profile page

  4. 在左侧侧边栏中,单击 Hooks

    Hooks tab in the business account settings sidebar

  5. 在您想要删除的 web 挂钩旁,请单击 Delete

    web 挂钩旁的 Delete 按钮

  6. 阅读有关删除 web 挂钩的信息,然后单击 Yes, delete webhook

    包含警告信息的弹出框和用于确认删除 web 挂钩的按钮

查看最近的交付和回复

  1. In the upper-right corner of any page, click .

    用于访问站点管理员设置的火箭图标

  2. In the left sidebar, click Business.

    Business tab in the Site admin settings

  3. Under your business account's name, click Settings.

    Settings tab on the business account profile page

  4. 在左侧侧边栏中,单击 Hooks

    Hooks tab in the business account settings sidebar

  5. 在 web 挂钩列表中,单击您想要查看其投递的 web 挂钩。

    包含用于查看每个 web 挂钩的链接的 web 挂钩列表

  6. 在“Recent deliveries”下,单击投递以查看详细信息。

    包含用于查看详细信息的链接的 web 挂钩最近投递列表

问问别人

找不到要找的内容?

联系我们