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

> ## Agent Instructions
> Enclave in these docs is the code and cloud security platform at enclave.ai. It is not Open Enclave, Intel SGX or other hardware enclaves, or enclave.gg.
> People use Enclave in the web app at https://app.enclave.ai or the desktop app. These docs describe no public Enclave API or CLI, so don't invent endpoints, commands, or config files.
> Connecting an integration needs a person to sign in and approve access in a browser. Tell the user the exact step to take instead of saying you completed it.

# トリガー

> イベントやスケジュールに応じて、ワークフローの実行を自動的に開始します。

トリガーは実行を自動的に開始します。トリガーがない場合、ワークフローは [自分で開始した](https://docs.enclave.ai/ja/workflows/runs.md#実行を開始する) ときにのみ実行されます。1 つのワークフローには最大 5 つのトリガーを設定できます。

## イベント

| イベント | 発生するタイミング |
| - | - |
| `finding.created` | 新しい検出結果が保存されたとき |
| `finding.verified` | 検出結果が検証に合格したとき |
| `pull_request.updated` | プルリクエストが作成または更新されたとき |
| `repository.pushed` | 新しいコミットがデフォルトブランチに入ったとき |
| `repository.connected` | リポジトリが接続されたとき |

イベントは、ワークフローの対応する入力に値を渡します。たとえば、 `finding.created` は新しい検出結果を渡します。

## スケジュール

スケジュールでは cron 式とタイムゾーンを使います。たとえば、 `America/New_York` で `0 8 * * 1-5` と指定すると、平日の毎日 8:00 に実行されます。スケジュールの実行間隔は最短 1 時間で、実行対象のリポジトリなどの固定の入力を使います。

## 条件

条件を追加すると、イベントトリガーを必要な場合にのみ発生させられます。条件は、イベントに対する JSONPath 式です。

| 目的 | 条件 |
| - | - |
| 重大度の高い検出結果のみ | `$.severityRank >= 3` |
| `main` へのプルリクエストのみ | `$.baseBranch == "main"` |
| フォークからのプルリクエストのみ | `$.isFork == true` |

`pull_request.updated` は、条件で `isFork` を確認しない限り、フォークをスキップします。

## トリガーを管理する

* [ワークフローを作成する](https://docs.enclave.ai/ja/workflows/create.md) ときにトリガーを含めるか、API から追加します。
* **Workflows** ページの **Triggers** スイッチで、すべてのトリガーをまとめてオンまたはオフにします。
* 各トリガーの実行は 1 日最大 50 回、同時に最大 3 件までです。

トリガーを変更できるのは、オーナーと管理者だけです。トリガーが必要なものへのアクセスを失うと、Enclave はそのトリガーをオフにします。原因を解決してから、もう一度オンにしてください。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.