Skip to main content
A trigger starts a run automatically. Without one, a workflow runs only when you start it. A workflow can have up to five triggers.

Events

The event fills the workflow’s matching input. For example, finding.created passes the new finding. pull_request.commented, issue.opened, and release.published work with GitHub and GitLab repositories. A GitLab connection made before these events were available sends issue and release events only after an admin reconnects it.

Use event data in prompts

An agent prompt can read the data of the event that started the run as {{event.<path>}}. For example:
To see the fields an event provides, open the workflow, select the trigger on the Flow tab, and expand Event fields. Each field shows its type, and fields marked may be empty can have no value.
A workflow's Flow tab with the New issues trigger selected, showing the issue.opened event and its list of event fields such as event.repository.fullName
{{event.<path>}} works only in agent prompts. Every trigger of the workflow must be an event trigger whose event has that field, so Enclave refuses to save a workflow that also has a schedule. When you start the run yourself, Enclave asks you for a value for each field instead.

Schedules

A schedule uses a cron expression and a time zone, for example 0 8 * * 1-5 in America/New_York for 8:00 every weekday. Schedules run at most once an hour and use fixed inputs, such as the repository to run on.

Conditions

Add a condition so an event trigger only fires when it matters. Conditions are JSONPath expressions over the event. Some events skip activity by default:
  • pull_request.updated and pull_request.commented skip pull requests from forks unless the condition checks isFork.
  • pull_request.commented and issue.opened fire only for trusted authors unless the condition checks authorTrusted. On GitHub, trusted authors are owners, members, and collaborators. On GitLab, they are authors in private projects.
  • Comments from bots and from Enclave itself never fire a trigger.

Manage triggers

  • Include a trigger when you create the workflow, or add more through the API.
  • Use the Triggers switch on the Workflows page to turn them all on or off.
  • A workflow you add from the marketplace keeps its event triggers, turned off. Turn them on when you’re ready.
Only owners and admins can change triggers. If a trigger loses access to what it needs, Enclave turns it off. Fix the cause and turn it back on.