Triggers
A trigger decides when a workflow starts. Every workflow has exactly one trigger. This page shows the four triggers that work today.
| Trigger type | The workflow starts when |
|---|---|
manual |
A person selects Run. |
cron |
A schedule fires. |
github |
A pull request, comment, or failed CI run happens on GitHub. |
azure_devops |
A pull request, comment, or failed build happens on Azure DevOps. |
manual
Section titled “manual”A person starts each run from the Agentic Workflows page.
trigger: type: manual config: inputs: - name: ticketKey type: stringinputs is optional. Each input becomes a field in the Run Workflow dialog. A step reads the value with {{inputs.ticketKey}}.
The workflow starts on a schedule.
trigger: type: cron config: schedule: "0 9 * * 1-5" tz: Europe/London| Field | Required | Meaning |
|---|---|---|
schedule |
Yes | A standard cron expression. The example means 09:00, Monday to Friday. |
tz |
No | An IANA time zone name, such as Asia/Kolkata. |
Three rules apply to scheduled workflows:
- The run uses the connections of the person who created the workflow. If that person no longer exists in Anthara, the workflow is turned off.
- Only one run of the workflow is active at a time. If the schedule fires while a run is active, the new run waits in a queue.
- A scheduled workflow also has a Run button, so you can start it by hand.
github
Section titled “github”The workflow starts from a GitHub event. It needs a top-level repo line.
repo: your-org/your-repotrigger: type: github config: events: - pull_request.opened - pull_request.synchronize branches: - mainUse your-org/* to match every repository in the organization.
| Event | Starts a run when |
|---|---|
pull_request.opened |
A pull request is opened. |
pull_request.synchronize |
New commits are pushed to a pull request. A run already in progress for the same pull request is cancelled first. |
workflow_run.completed |
A CI run finishes and it failed. |
issue_comment.created |
A new comment on a pull request mentions @anthara. |
pull_request_review_comment.created |
A new inline review comment mentions @anthara. |
branches is a list of branch patterns. A pull request event starts a run only when its target branch matches. Comment events ignore branches, so write branches: ["*"] for them.
Your GitHub App must be set up before these events arrive. See GitHub.
azure_devops
Section titled “azure_devops”The workflow starts from an Azure DevOps event. It also needs a top-level repo line.
repo: your-org/your-project/your-repotrigger: type: azure_devops config: events: - git.pullrequest.created - git.pullrequest.updated branches: - mainUse your-org/your-project/* to match every repository in the project.
| Event | Starts a run when |
|---|---|
git.pullrequest.created |
A pull request is created. |
git.pullrequest.updated |
A pull request is updated. |
build.complete |
A build finishes and it failed. |
git.pullrequest.commented |
A new pull request comment mentions @anthara. |
These runs use the Azure DevOps connection of the person who created the workflow. That person must have connected Azure DevOps under Connections. See Azure DevOps.
Inputs that event triggers provide
Section titled “Inputs that event triggers provide”GitHub and Azure DevOps triggers fill in inputs for you. A step reads them with {{inputs.<name>}}.
| Event kind | Inputs |
|---|---|
| Pull request | repo, prNumber, prUrl, headSha, baseBranch, sender |
| Failed CI run or build | runId, workflowName, headBranch, headSha, conclusion, runUrl, ciEvent |
| Comment | repo, prNumber, prUrl, sender, commentId, commentText |
commentText is text that a person typed. Tell the agent to treat it as data and not as instructions.
webhook
Section titled “webhook”The validator accepts type: webhook, but nothing sends events to it. A workflow with this trigger never starts. Don’t use it.