> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kodus.io/llms.txt
> Use this file to discover all available pages before exploring further.

# 创建 Webhook

> 当自动注册未发生时,手动创建 GitHub webhook,并选择 Kodus 消费的三个事件。

Kodus 通常会自动创建 webhook。如果没有发生，请按照以下步骤手动设置：

<Note>
  Webhook URL 必须指向 Webhooks 服务（端口 3332）。仅当反向代理将 `/.../webhook` 路径转发到 Webhooks 服务时，才能使用 API 域名。
</Note>

1. 前往您的 GitHub 仓库

2. 单击"设置"

3. 在左侧边栏中找到"Webhooks"

4. 单击"添加 webhook"

5. 配置您的 webhook：

   * **Payload URL**：输入 `.env` 文件中的 URL：`API_GITHUB_CODE_MANAGEMENT_WEBHOOK`
   * **Content type**：`application/json`
   * **Secret**：留空
   * **SSL verification**：启用 SSL 验证
   * **Which events would you like to trigger this webhook?**：让我选择单个事件
   * 勾选这些框：
     * 工单评论(Issue comment)
     * 拉取请求审查评论(Pull request review comments)
     * 拉取请求(Pull requests)

6. 单击"添加 webhook"

您已成功为 GitHub 仓库中的代码审查设置了 webhook。

<Note>
  Kodus 只消费这三个事件。勾选其他事件(pushes、pull request reviews、review threads)
  只会产生到达后即被丢弃的流量。
</Note>
