Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions docs/src/content/docs/reference/triggers.md
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,49 @@ on:

This filtering is especially useful for [LabelOps workflows](/gh-aw/examples/issue-pr-events/labelops/) where specific labels trigger different automation behaviors.

#### Shorthand Syntax for Label Triggers

GitHub Agentic Workflows provides convenient shorthand syntax for label-based triggers:

**Basic format:**
```yaml wrap
on: issue labeled bug
```

**Multiple labels (space-separated):**
```yaml wrap
on: issue labeled bug enhancement priority-high
```

**Multiple labels (comma-separated):**
```yaml wrap
on: issue labeled bug, enhancement, priority-high
```

**With explicit item type:**
```yaml wrap
on: pull_request labeled needs-review, ready-to-merge
```

All shorthand formats compile to the standard GitHub Actions syntax:

```yaml wrap
on:
issues: # or pull_request
types: [labeled]
names:
- bug
- enhancement
- priority-high
```

**Supported entity types:**
- `issue labeled <labels>` - Issue label events
- `pull_request labeled <labels>` - Pull request label events
- `discussion labeled <labels>` - Discussion label events (GitHub Actions doesn't support `names` for discussions, so only the `types` filter is applied)

The shorthand syntax automatically includes `workflow_dispatch` trigger, similar to how `on: daily` expands to include both schedule and workflow_dispatch.

### Reactions (`reaction:`)

An additional option `reaction:` is available within the `on:` section to enable emoji reactions on the triggering GitHub item (issue, PR, comment, discussion) to provide visual feedback about the workflow status:
Expand Down