You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pkg/cli/templates/github-agentic-workflows.md
+30-5Lines changed: 30 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -77,7 +77,7 @@ The YAML frontmatter supports these fields:
77
77
-**`on:`** - Workflow triggers (required)
78
78
- String: `"push"`, `"issues"`, etc.
79
79
- Object: Complex trigger configuration
80
-
- Special: `command:` for /mention triggers
80
+
- Special: `slash_command:` for /mention triggers (or deprecated `command:`)
81
81
-**`forks:`** - Fork allowlist for `pull_request` triggers (array or string). By default, workflows block all forks and only allow same-repo PRs. Use `["*"]` to allow all forks, or specify patterns like `["org/*", "user/repo"]`
82
82
-**`stop-after:`** - Can be included in the `on:` object to set a deadline for workflow execution. Supports absolute timestamps ("YYYY-MM-DD HH:MM:SS") or relative time deltas (+25h, +3d, +1d12h). The minimum unit for relative deltas is hours (h). Uses precise date calculations that account for varying month lengths.
83
83
-**`reaction:`** - Add emoji reactions to triggering items
@@ -108,6 +108,10 @@ The YAML frontmatter supports these fields:
108
108
-**`roles:`** - Repository access roles that can trigger workflow (array or "all")
109
109
- Default: `[admin, maintainer, write]`
110
110
- Available roles: `admin`, `maintainer`, `write`, `read`, `all`
111
+
-**`bots:`** - Allow list of bot identifiers that can trigger workflow (array)
112
+
- Bots in this list can trigger workflows even without required role permissions
113
+
- Bot must be installed/active on repository to trigger workflow
When using `safe-outputs.add-comment`, the main job does **not** need `issues: write` or `pull-requests: write` permissions since comment creation is handled by a separate job with appropriate permissions.
345
+
346
+
The `hide-older-comments` field minimizes previous comments from the same workflow (identified by tracker-id) before adding the new comment. The `allowed-reasons` field restricts which hide reasons are permitted: `spam`, `abuse`, `off_topic`, `outdated`, `resolved`.
339
347
- `create-pull-request:`- Safe pull request creation with git patches
340
348
```yaml
341
349
safe-outputs:
@@ -508,8 +516,23 @@ The YAML frontmatter supports these fields:
508
516
github-token: ${{ secrets.CUSTOM_PAT }} # Use custom PAT instead of GITHUB_TOKEN
509
517
```
510
518
Useful when you need additional permissions or want to perform actions across repositories.
519
+
- `mentions:`- Control @mention filtering in AI-generated content (boolean or object)
520
+
```yaml
521
+
safe-outputs:
522
+
mentions: false # Escape all mentions (default)
523
+
524
+
# Advanced configuration
525
+
mentions:
526
+
allow-team-members: true # Allow team member mentions (default: true)
allowed: [username, botname] # Explicit allow list
529
+
max: 50 # Max mentions per message (default: 50)
530
+
```
531
+
Controls whether @mentions in AI-generated content are allowed or escaped. By default, mentions are escaped for security. Use `allow-team-members` to permit repository collaborators, `allow-context` for event-related users (authors, assignees), or `allowed` for explicit usernames. Setting `mentions: true` is an error in strict mode.
511
532
512
-
- **`command:`** - Command trigger configuration for /mention workflows
533
+
- **`slash_command:`** - Slash command trigger configuration for /mention workflows
534
+
- Also accepts deprecated `command:` field (emits compilation warning)
535
+
- Use `slash_command:` for new workflows
513
536
- **`cache:`** - Cache configuration for workflow dependencies (object or array)
514
537
- **`cache-memory:`** - Memory MCP server with persistent cache storage (boolean or object)
515
538
@@ -685,17 +708,19 @@ on:
685
708
### Command Triggers (/mentions)
686
709
```yaml
687
710
on:
688
-
command:
711
+
slash_command:
689
712
name: my-bot # Responds to /my-bot in issues/comments
690
713
```
691
714
692
715
This automatically creates conditions to match `/my-bot` mentions in issue bodies and comments.
693
716
717
+
**Note**: The `command:` field is deprecated. Use `slash_command:` for new workflows. Existing workflows using `command:` will continue to work but emit a compilation warning.
718
+
694
719
You can restrict where commands are active using the `events:` field:
695
720
696
721
```yaml
697
722
on:
698
-
command:
723
+
slash_command:
699
724
name: my-bot
700
725
events: [issues, issue_comment] # Only in issue bodies and issue comments
701
726
```
@@ -1162,7 +1187,7 @@ Research latest developments in ${{ github.repository }}:
0 commit comments