> ## 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

<Note>
  Forgejo 支持由社区维护。
</Note>

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

<Note>
  Webhook URL 必须能够访问 Webhooks 服务（端口 3332）。只有当您的反向代理将 `/.../webhook` 路径路由到 Webhooks 服务时，才可以使用 API 域名。
</Note>

1. 导航到您的 Forgejo 仓库

2. 点击右侧边栏的 **Settings**

3. 选择 **Webhooks**

4. 点击 **Add Webhook** → **Forgejo**

5. 配置您的 webhook：

   * **Target URL**: 输入您希望接收通知的 URL，即您在 `.env` 文件中为 `GLOBAL_FORGEJO_CODE_MANAGEMENT_WEBHOOK` 设置的 URL
   * **HTTP Method**: POST
   * **POST Content Type**: `application/json`
   * **Trigger On**: 选择以下事件：
     * Push events
     * Pull Request events
     * Issues events
     * Issue Comment events
   * **Active**: 勾选

6. 点击 **Add Webhook**

大功告成！您已成功为 Forgejo 仓库设置了代码审查的 webhook。
