Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go

docs: document CLI webhook event filters (MUL-9306) (#10716)

Bohan Jiang47d55518fa9a
diff --git a/apps/docs/content/docs/autopilots.fr.mdx b/apps/docs/content/docs/autopilots.fr.mdx
index 248c3d840a..cee95840a6 100644
--- a/apps/docs/content/docs/autopilots.fr.mdx
+++ b/apps/docs/content/docs/autopilots.fr.mdx
@@ -91,6 +91,8 @@ Lorsqu'une même source envoie plusieurs types d'événements, ajoutez des filtr
Par exemple, avec `workflow_run` comme nom d'événement et `completed, failed` comme actions, seuls ces deux types de résultats `workflow_run` sont acceptés. Multica reconnaît l'événement et l'action à partir des en-têtes de requête et des champs de charge utile courants, notamment l'en-tête `X-GitHub-Event` de GitHub et le champ `action` du corps.
+Vous pouvez aussi configurer entièrement ces filtres via le CLI avec `--event-filters-file`. Une mise à jour sans option de filtrage conserve les filtres existants ; `--clear-event-filters` les supprime explicitement et accepte tous les événements. Voir les [exemples CLI](/cli#webhook-event-filters) pour le format JSON et les commandes.
+
### Protéger l'URL du webhook
<Callout type="warning">
diff --git a/apps/docs/content/docs/autopilots.ja.mdx b/apps/docs/content/docs/autopilots.ja.mdx
index 7d830a644f..5d8bba93ea 100644
--- a/apps/docs/content/docs/autopilots.ja.mdx
+++ b/apps/docs/content/docs/autopilots.ja.mdx
@@ -91,6 +91,8 @@ Webhook リクエストには次の制約があります。
たとえばイベント名に `workflow_run`、Actions に `completed, failed` を指定すると、この 2 種類の `workflow_run` の結果だけを受け取ります。Multica は一般的なリクエストヘッダーと payload からイベントと action を判定します。GitHub の `X-GitHub-Event` と body の `action` にも対応しています。
+CLI の `--event-filters-file` でも、これらのフィルターをすべて設定できます。更新時にフィルターオプションを省略すると既存の設定を保持し、`--clear-event-filters` を指定すると明示的に削除して全イベントを受け入れます。JSON 形式とコマンドは [CLI の例](/cli#webhook-event-filters)を参照してください。
+
### Webhook URL を保護する
<Callout type="warning">
diff --git a/apps/docs/content/docs/autopilots.ko.mdx b/apps/docs/content/docs/autopilots.ko.mdx
index ab0abbf773..bc5a151557 100644
--- a/apps/docs/content/docs/autopilots.ko.mdx
+++ b/apps/docs/content/docs/autopilots.ko.mdx
@@ -91,6 +91,8 @@ Webhook 요청에는 다음 제약이 있습니다.
예를 들어 이벤트 이름에 `workflow_run`, Actions에 `completed, failed`를 입력하면 이 두 종류의 `workflow_run` 결과만 받습니다. Multica는 GitHub의 `X-GitHub-Event`와 body의 `action`을 포함해 일반적인 요청 header와 payload에서 이벤트와 action을 식별합니다.
+CLI의 `--event-filters-file`로도 이 필터들을 모두 설정할 수 있습니다. 업데이트할 때 필터 옵션을 생략하면 기존 설정이 유지되고, `--clear-event-filters`를 지정하면 필터를 명시적으로 삭제하여 모든 이벤트를 받습니다. JSON 형식과 명령은 [CLI 예시](/cli#webhook-event-filters)를 참고하세요.
+
### Webhook URL 보호
<Callout type="warning">
diff --git a/apps/docs/content/docs/autopilots.mdx b/apps/docs/content/docs/autopilots.mdx
index 2e197dc2b1..d91bf38a10 100644
--- a/apps/docs/content/docs/autopilots.mdx
+++ b/apps/docs/content/docs/autopilots.mdx
@@ -91,6 +91,8 @@ When one source sends several event types, add event filters to the trigger. Eac
For example, with `workflow_run` as the event name and `completed, failed` as the actions, only those two kinds of `workflow_run` results are accepted. Multica recognizes the event and action from common request headers and payload fields, including GitHub's `X-GitHub-Event` and the `action` field in the body.
+You can also configure these filters entirely through the CLI with `--event-filters-file`. Updating without either filter option preserves existing filters; `--clear-event-filters` explicitly removes them and accepts all events. See the [CLI examples](/cli#webhook-event-filters) for the JSON format and commands.
+
### Protect the webhook URL
<Callout type="warning">
diff --git a/apps/docs/content/docs/autopilots.zh-Hant.mdx b/apps/docs/content/docs/autopilots.zh-Hant.mdx
index 213fef0b9d..12ef86af94 100644
--- a/apps/docs/content/docs/autopilots.zh-Hant.mdx
+++ b/apps/docs/content/docs/autopilots.zh-Hant.mdx
@@ -91,6 +91,8 @@ Webhook 請求的約束:
例如,事件名填寫 `workflow_run`,Actions 填寫 `completed, failed`,只會接收這兩類 `workflow_run` 結果。Multica 會從常見請求頭和 payload 中識別事件與 action,包括 GitHub 的 `X-GitHub-Event` 和 body 中的 `action`。
+也可以透過 CLI 的 `--event-filters-file` 完整配置這些條件。更新時不傳過濾引數就保留原值;`--clear-event-filters` 明確清空條件、恢復接收所有事件。JSON 格式和命令見 [CLI 範例](/cli#webhook-event-filters)。
+
### 保護 Webhook URL
<Callout type="warning">
diff --git a/apps/docs/content/docs/autopilots.zh.mdx b/apps/docs/content/docs/autopilots.zh.mdx
index 9a2952c6c0..31f9184457 100644
--- a/apps/docs/content/docs/autopilots.zh.mdx
+++ b/apps/docs/content/docs/autopilots.zh.mdx
@@ -91,6 +91,8 @@ Webhook 请求的约束:
例如,事件名填写 `workflow_run`,Actions 填写 `completed, failed`,只会接收这两类 `workflow_run` 结果。Multica 会从常见请求头和 payload 中识别事件与 action,包括 GitHub 的 `X-GitHub-Event` 和 body 中的 `action`。
+也可以通过 CLI 的 `--event-filters-file` 完整配置这些条件。更新时不传过滤参数就保留原值;`--clear-event-filters` 明确清空条件、恢复接收所有事件。JSON 格式和命令见 [CLI 示例](/cli#webhook-event-filters)。
+
### 保护 Webhook URL
<Callout type="warning">
diff --git a/apps/docs/content/docs/cli.fr.mdx b/apps/docs/content/docs/cli.fr.mdx
index 1919940de8..a5a2ac15ff 100644
--- a/apps/docs/content/docs/cli.fr.mdx
+++ b/apps/docs/content/docs/cli.fr.mdx
@@ -335,6 +335,36 @@ multica autopilot trigger-add <autopilot-id> --cron "0 9 * * 1" --timezone Europ
- Le `--context` d'un espace de travail est fourni à tous ses agents. `--slug` ne peut plus être modifié après la création. `--issue-prefix` est mis en majuscules ; le changer renumérote toutes les tâches existantes, et les anciens identifiants cités ailleurs ne mènent plus nulle part.
- `--issue-title-template` ne remplace que `{{date}}` (UTC, `YYYY-MM-DD`) et refuse tout autre `{{...}}`. Le `--timezone` d'un déclencheur planifié vaut UTC par défaut.
+### Filtres d'événements webhook [#webhook-event-filters]
+
+Utilisez `--event-filters-file` avec `autopilot trigger-add` ou `trigger-update` pour configurer les filtres d'événements et d'actions d'un déclencheur webhook. Enregistrez un tableau JSON non vide dans `filters.json` :
+
+```json
+[
+ {"event": "pull_request_review", "actions": ["submitted"]},
+ {"event": "push"}
+]
+```
+
+Cet exemple accepte les soumissions de revues de PR et tous les événements push. Omettre `actions` ou fournir un tableau d'actions vide accepte toutes les actions de cet événement.
+
+```bash
+multica autopilot trigger-add <autopilot-id> --kind webhook --event-filters-file filters.json
+multica autopilot trigger-list <autopilot-id> --full-id
+multica autopilot trigger-update <autopilot-id> <trigger-id> --event-filters-file filters.json
+multica autopilot get <autopilot-id> --output json
+```
+
+Lors d'une mise à jour, le fichier remplace toute la liste des filtres. Omettre les deux options de filtrage conserve les filtres enregistrés, même lors d'un changement de libellé ou de l'activation/désactivation du déclencheur. `autopilot get` renvoie les filtres dans le tableau `triggers` au niveau racine.
+
+Pour supprimer tous les filtres et accepter tous les événements, utilisez l'option réservée à la mise à jour :
+
+```bash
+multica autopilot trigger-update <autopilot-id> <trigger-id> --clear-event-filters
+```
+
+`--clear-event-filters` et `--event-filters-file` ne peuvent pas être combinés. Un fichier dont la valeur racine est `null` ou un tableau vide, ou qui contient des champs inconnus, un JSON invalide ou des noms d'événement/d'action vides ou composés uniquement d'espaces, est refusé. Ces options ne s'appliquent qu'aux déclencheurs webhook ; en créer un sans fichier de filtres accepte tous les événements. Voir [Automatisations](/autopilots#filtres-dévénements) pour la correspondance des événements entrants.
+
## Vue d'ensemble des commandes
| Commande | Rôle |
diff --git a/apps/docs/content/docs/cli.ja.mdx b/apps/docs/content/docs/cli.ja.mdx
index 9a8abd5c7d..9445f4c163 100644
--- a/apps/docs/content/docs/cli.ja.mdx
+++ b/apps/docs/content/docs/cli.ja.mdx
@@ -335,6 +335,36 @@ multica autopilot trigger-add <autopilot-id> --cron "0 9 * * 1" --timezone Asia/
- ワークスペースの `--context` は、ワークスペース内のすべてのエージェントに渡されます。`--slug` は作成後に変更できません。`--issue-prefix` は大文字に変換され、変更すると既存のすべてのタスクが振り直され、外部から参照している古い番号は使えなくなります。
- `--issue-title-template` で置き換えられるのは `{{date}}`(UTC、`YYYY-MM-DD`)だけで、ほかの `{{...}}` は拒否されます。スケジュールトリガーの `--timezone` は既定で UTC です。
+### Webhook イベントフィルター [#webhook-event-filters]
+
+`autopilot trigger-add` または `trigger-update` の `--event-filters-file` で、Webhook トリガーのイベントと action のフィルターを設定できます。空でない JSON 配列を `filters.json` として保存します。
+
+```json
+[
+ {"event": "pull_request_review", "actions": ["submitted"]},
+ {"event": "push"}
+]
+```
+
+この例では、PR レビューの送信とすべての push イベントを受け入れます。`actions` を省略するか空の配列を指定すると、そのイベントのすべての action を受け入れます。
+
+```bash
+multica autopilot trigger-add <autopilot-id> --kind webhook --event-filters-file filters.json
+multica autopilot trigger-list <autopilot-id> --full-id
+multica autopilot trigger-update <autopilot-id> <trigger-id> --event-filters-file filters.json
+multica autopilot get <autopilot-id> --output json
+```
+
+更新時はファイルの内容でフィルター一覧全体を置き換えます。両方のフィルターオプションを省略すると、ラベルの変更やトリガーの有効化・無効化でも保存済みのフィルターを保持します。`autopilot get` はトップレベルの `triggers` 配列でフィルターを返します。
+
+すべてのフィルターを削除して全イベントを受け入れるには、更新専用のオプションを使います。
+
+```bash
+multica autopilot trigger-update <autopilot-id> <trigger-id> --clear-event-filters
+```
+
+`--clear-event-filters` と `--event-filters-file` は同時に指定できません。トップレベルが `null` または空の配列であるファイルや、不明なフィールド、不正な JSON、空または空白のみのイベント名・action 名を含むファイルは拒否されます。これらのオプションは Webhook トリガー専用です。フィルターファイルを指定せずに作成すると全イベントを受け入れます。受信イベントの照合方法は[オートパイロット](/autopilots#event-filters)を参照してください。
+
## コマンド概要
| コマンド | 用途 |
diff --git a/apps/docs/content/docs/cli.ko.mdx b/apps/docs/content/docs/cli.ko.mdx
index badc3d314e..3709e43b24 100644
--- a/apps/docs/content/docs/cli.ko.mdx
+++ b/apps/docs/content/docs/cli.ko.mdx
@@ -335,6 +335,36 @@ multica autopilot trigger-add <autopilot-id> --cron "0 9 * * 1" --timezone Asia/
- 워크스페이스의 `--context`는 워크스페이스의 모든 에이전트에게 제공됩니다. `--slug`는 만든 뒤 바꿀 수 없습니다. `--issue-prefix`는 대문자로 바뀌며, 변경하면 기존 태스크 번호가 모두 다시 매겨져 외부에서 참조하던 예전 번호는 더 이상 연결되지 않습니다.
- `--issue-title-template`은 `{{date}}`(UTC, `YYYY-MM-DD`)만 치환하며 다른 `{{...}}`는 거부합니다. 일정 트리거의 `--timezone` 기본값은 UTC입니다.
+### Webhook 이벤트 필터 [#webhook-event-filters]
+
+`autopilot trigger-add` 또는 `trigger-update`에서 `--event-filters-file`로 Webhook 트리거의 이벤트와 action 필터를 설정할 수 있습니다. 비어 있지 않은 JSON 배열을 `filters.json`으로 저장하세요.
+
+```json
+[
+ {"event": "pull_request_review", "actions": ["submitted"]},
+ {"event": "push"}
+]
+```
+
+이 예시는 PR 리뷰 제출과 모든 push 이벤트를 받습니다. `actions`를 생략하거나 빈 배열을 지정하면 해당 이벤트의 모든 action을 받습니다.
+
+```bash
+multica autopilot trigger-add <autopilot-id> --kind webhook --event-filters-file filters.json
+multica autopilot trigger-list <autopilot-id> --full-id
+multica autopilot trigger-update <autopilot-id> <trigger-id> --event-filters-file filters.json
+multica autopilot get <autopilot-id> --output json
+```
+
+업데이트할 때 파일 내용이 필터 목록 전체를 대체합니다. 두 필터 옵션을 모두 생략하면 라벨을 바꾸거나 트리거를 활성화/비활성화할 때도 저장된 필터가 유지됩니다. `autopilot get`은 최상위 `triggers` 배열에서 필터를 반환합니다.
+
+모든 필터를 삭제하고 모든 이벤트를 받으려면 업데이트 전용 옵션을 사용하세요.
+
+```bash
+multica autopilot trigger-update <autopilot-id> <trigger-id> --clear-event-filters
+```
+
+`--clear-event-filters`와 `--event-filters-file`은 함께 사용할 수 없습니다. 최상위 값이 `null` 또는 빈 배열인 파일이나, 알 수 없는 필드, 잘못된 JSON 또는 비어 있거나 공백으로만 이루어진 이벤트/action 이름이 포함된 파일은 거부됩니다. 이 옵션들은 Webhook 트리거에만 적용됩니다. 필터 파일 없이 생성하면 모든 이벤트를 받습니다. 수신 이벤트의 매칭 방식은 [오토파일럿](/autopilots#event-filters)을 참고하세요.
+
## 명령 개요
| 명령 | 용도 |
diff --git a/apps/docs/content/docs/cli.mdx b/apps/docs/content/docs/cli.mdx
index 2240bb3e35..c1bb2e17b5 100644
--- a/apps/docs/content/docs/cli.mdx
+++ b/apps/docs/content/docs/cli.mdx
@@ -350,6 +350,36 @@ multica autopilot trigger-add <autopilot-id> --cron "0 9 * * 1" --timezone Europ
- A workspace's `--context` is provided to every agent in the workspace. `--slug` cannot be changed after creation. `--issue-prefix` is uppercased; changing it renumbers every existing issue, and old identifiers in external references stop resolving.
- `--issue-title-template` interpolates only `{{date}}` (UTC, `YYYY-MM-DD`) and rejects any other `{{...}}` token. A schedule trigger's `--timezone` defaults to UTC.
+### Webhook event filters [#webhook-event-filters]
+
+Use `--event-filters-file` on `autopilot trigger-add` or `trigger-update` to configure a webhook trigger's event and action filters. Save a nonempty JSON array as `filters.json`:
+
+```json
+[
+ {"event": "pull_request_review", "actions": ["submitted"]},
+ {"event": "push"}
+]
+```
+
+This accepts PR review submissions and all push events. Omitting `actions` or using an empty actions array accepts every action for that event.
+
+```bash
+multica autopilot trigger-add <autopilot-id> --kind webhook --event-filters-file filters.json
+multica autopilot trigger-list <autopilot-id> --full-id
+multica autopilot trigger-update <autopilot-id> <trigger-id> --event-filters-file filters.json
+multica autopilot get <autopilot-id> --output json
+```
+
+The file replaces the entire filter list on update. Omitting both filter options preserves the saved filters, including when updating a label or enabling/disabling the trigger. `autopilot get` returns the filters in the top-level `triggers` array.
+
+To remove all filters and accept every event, use the update-only flag:
+
+```bash
+multica autopilot trigger-update <autopilot-id> <trigger-id> --clear-event-filters
+```
+
+`--clear-event-filters` and `--event-filters-file` cannot be combined. Top-level `null` or an empty array, unknown fields, malformed JSON, and blank event/action names are rejected. These options apply only to webhook triggers; creating one without a filter file accepts all events. See [Autopilots](/autopilots#event-filters) for how incoming events are matched.
+
## Command overview
| Command | Purpose |
diff --git a/apps/docs/content/docs/cli.zh-Hant.mdx b/apps/docs/content/docs/cli.zh-Hant.mdx
index 932fbb772d..2c988de31a 100644
--- a/apps/docs/content/docs/cli.zh-Hant.mdx
+++ b/apps/docs/content/docs/cli.zh-Hant.mdx
@@ -332,6 +332,36 @@ multica autopilot trigger-add <autopilot-id> --cron "0 9 * * 1" --timezone Asia/
- 工作區的 `--context` 會提供給工作區裡的每個 AI 代理。`--slug` 建立後不能修改;`--issue-prefix` 會轉成大寫,修改它會給所有現有任務重新編號,外部引用裡的舊編號隨之失效。
- `--issue-title-template` 只替換 `{{date}}`(UTC,`YYYY-MM-DD`),其他 `{{...}}` 會被拒絕。定時觸發器的 `--timezone` 預設 UTC。
+### Webhook 事件過濾 [#webhook-event-filters]
+
+`autopilot trigger-add` 和 `trigger-update` 可以透過 `--event-filters-file` 配置 Webhook 觸發器的事件和 action 過濾條件。將非空 JSON 陣列儲存為 `filters.json`:
+
+```json
+[
+ {"event": "pull_request_review", "actions": ["submitted"]},
+ {"event": "push"}
+]
+```
+
+這個範例接收 PR 評審提交和所有 push 事件。省略 `actions` 或使用空的 actions 陣列,表示接收該事件的所有 action。
+
+```bash
+multica autopilot trigger-add <autopilot-id> --kind webhook --event-filters-file filters.json
+multica autopilot trigger-list <autopilot-id> --full-id
+multica autopilot trigger-update <autopilot-id> <trigger-id> --event-filters-file filters.json
+multica autopilot get <autopilot-id> --output json
+```
+
+更新時,檔案內容會替換整組過濾條件。不傳這兩個過濾引數就保留原值,修改標籤或啟停觸發器時也一樣。`autopilot get` 在頂層 `triggers` 陣列中返回過濾條件。
+
+要刪除全部過濾條件、恢復接收所有事件,使用僅限更新的引數:
+
+```bash
+multica autopilot trigger-update <autopilot-id> <trigger-id> --clear-event-filters
+```
+
+`--clear-event-filters` 與 `--event-filters-file` 不能同時使用。頂層為 `null` 或空陣列、包含未知欄位、無效 JSON 或空白事件/action 名稱的檔案會被拒絕。這些引數只適用於 Webhook 觸發器;建立時不傳過濾檔案則接收所有事件。事件匹配方式見[自動化](/autopilots#事件過濾)。
+
## 命令概覽
| 命令 | 用途 |
diff --git a/apps/docs/content/docs/cli.zh.mdx b/apps/docs/content/docs/cli.zh.mdx
index 6301540edb..f563c41edb 100644
--- a/apps/docs/content/docs/cli.zh.mdx
+++ b/apps/docs/content/docs/cli.zh.mdx
@@ -335,6 +335,36 @@ multica autopilot trigger-add <autopilot-id> --cron "0 9 * * 1" --timezone Asia/
- 工作区的 `--context` 会提供给工作区里的每个智能体。`--slug` 创建后不能修改;`--issue-prefix` 会转成大写,修改它会给所有现有任务重新编号,外部引用里的旧编号随之失效。
- `--issue-title-template` 只替换 `{{date}}`(UTC,`YYYY-MM-DD`),其他 `{{...}}` 会被拒绝。定时触发器的 `--timezone` 默认 UTC。
+### Webhook 事件过滤 [#webhook-event-filters]
+
+`autopilot trigger-add` 和 `trigger-update` 可以通过 `--event-filters-file` 配置 Webhook 触发器的事件和 action 过滤条件。将非空 JSON 数组保存为 `filters.json`:
+
+```json
+[
+ {"event": "pull_request_review", "actions": ["submitted"]},
+ {"event": "push"}
+]
+```
+
+这个示例接收 PR 评审提交和所有 push 事件。省略 `actions` 或使用空的 actions 数组,表示接收该事件的所有 action。
+
+```bash
+multica autopilot trigger-add <autopilot-id> --kind webhook --event-filters-file filters.json
+multica autopilot trigger-list <autopilot-id> --full-id
+multica autopilot trigger-update <autopilot-id> <trigger-id> --event-filters-file filters.json
+multica autopilot get <autopilot-id> --output json
+```
+
+更新时,文件内容会替换整组过滤条件。不传这两个过滤参数就保留原值,修改标签或启停触发器时也一样。`autopilot get` 在顶层 `triggers` 数组中返回过滤条件。
+
+要删除全部过滤条件、恢复接收所有事件,使用仅限更新的参数:
+
+```bash
+multica autopilot trigger-update <autopilot-id> <trigger-id> --clear-event-filters
+```
+
+`--clear-event-filters` 与 `--event-filters-file` 不能同时使用。顶层为 `null` 或空数组、包含未知字段、无效 JSON 或空白事件/action 名称的文件会被拒绝。这些参数只适用于 Webhook 触发器;创建时不传过滤文件则接收所有事件。事件匹配方式见[自动化](/autopilots#事件过滤)。
+
## 命令概览
| 命令 | 用途 |