Skip to content
Merged
Show file tree
Hide file tree
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
2,877 changes: 2,877 additions & 0 deletions examples/label-trigger-discussion.lock.yml

Large diffs are not rendered by default.

34 changes: 34 additions & 0 deletions examples/label-trigger-discussion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: Label Trigger Example - Discussion
description: Example workflow demonstrating the discussion labeled trigger shorthand syntax
on: discussion labeled question announcement help-wanted
engine:
id: codex
model: gpt-5-mini
strict: true
---

# Label Trigger Example - Discussion

This workflow demonstrates the discussion labeled trigger shorthand syntax:

```yaml
on: discussion labeled question announcement help-wanted
```

This short syntax automatically expands to:
- Discussion labeled with any of the specified labels (question, announcement, help-wanted)
- Workflow dispatch trigger with an item_number input parameter

Note: GitHub Actions does not support the `names` field for discussion events, so label filtering
must be handled via job conditions if needed. The shorthand still provides workflow_dispatch support.

## Task

When this workflow is triggered, acknowledge that it was triggered and provide a brief summary.

Example output:
```
✅ Workflow triggered!
📋 This workflow responds to label events on discussions
```
2,882 changes: 2,882 additions & 0 deletions examples/label-trigger-pull-request.lock.yml

Large diffs are not rendered by default.

31 changes: 31 additions & 0 deletions examples/label-trigger-pull-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: Label Trigger Example - Pull Request
description: Example workflow demonstrating the pull_request labeled trigger shorthand syntax
on: pull_request labeled needs-review approved ready-to-merge
engine:
id: codex
model: gpt-5-mini
strict: true
---

# Label Trigger Example - Pull Request

This workflow demonstrates the pull_request labeled trigger shorthand syntax:

```yaml
on: pull_request labeled needs-review approved ready-to-merge
```

This short syntax automatically expands to:
- Pull request labeled with any of the specified labels
- Workflow dispatch trigger with an item_number input parameter

## Task

When this workflow is triggered, acknowledge that it was triggered and provide a brief summary.

Example output:
```
✅ Workflow triggered for PR!
📋 This workflow responds to label events on pull requests
```
Loading
Loading