docs: expand slash command event filtering documentation#25898
Merged
docs: expand slash command event filtering documentation#25898
Conversation
Expand the "Filtering Command Events" section in command-triggers.md with: - Motivation explaining the noise problem from default all-events triggers - Structured table of all supported event identifiers - Issue-only example workflow for bug investigation pipelines - PR-only example workflow - Note about pull_request_comment vs issue_comment mapping Also expand the slash_command section in triggers.md with an inline event filtering example. Agent-Logs-Url: https://github.com/github/gh-aw/sessions/f6fde4fd-e1f4-46de-a141-0553f9fdd303 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add scope option to slash_command for event type restrictions
docs: expand slash command event filtering documentation
Apr 12, 2026
Collaborator
|
@copilot unbloat added docs, do not recommend permissions write |
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/521794fa-c4ca-4e3c-9992-a31336bfbb56 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
Author
pelikhan
approved these changes
Apr 12, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Expands documentation around slash_command.events to explain why and how to filter command-trigger contexts, reducing skipped-run noise in the GitHub Actions UI.
Changes:
- Adds an inline
events:example to theslash_command:section in the triggers reference. - Expands “Filtering Command Events” in the command triggers reference with motivation, supported events, concise examples, and an
issue_commentvspull_request_commentmapping note.
Show a summary per file
| File | Description |
|---|---|
| docs/src/content/docs/reference/triggers.md | Adds a discoverable events: example under slash_command: to encourage context filtering. |
| docs/src/content/docs/reference/command-triggers.md | Expands event filtering docs with motivation, supported events list, mapping note, and shorter examples. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comments suppressed due to low confidence (1)
docs/src/content/docs/reference/command-triggers.md:105
- The section title “Example command workflow” is followed by
yamlsnippets that only show anon:block (not a complete workflow markdown/frontmatter example). Consider renaming the heading to reflect that these are event-filtering examples/config snippets, or switch the examples back to a fullawworkflow format if “workflow” is meant literally.
### Example command workflow
Issue-only command (avoids skipped runs from PR events):
```yaml wrap
- Files reviewed: 2/2 changed files
- Comments generated: 2
| The `slash_command:` trigger creates workflows that respond to `/command-name` mentions in issues, pull requests, and comments. See [Command Triggers](/gh-aw/reference/command-triggers/) for complete documentation including event filtering, context text, reactions, and examples. | ||
| The `slash_command:` trigger creates workflows that respond to `/command-name` mentions in issues, pull requests, and comments. | ||
|
|
||
| By default, command triggers listen to **all** comment-related events, which can create noise from skipped runs. Use the `events:` field to restrict where commands are active: |
| ## Filtering Command Events | ||
|
|
||
| By default, command triggers respond to `/command-name` mentions in all comment-related contexts. Use the `events:` field to restrict where commands are active: | ||
| By default, command triggers listen to all comment-related events, which can create skipped runs in the Actions UI. Use the `events:` field to restrict where commands are active: |
This was referenced Apr 12, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Default
slash_commandtriggers generate listeners for all event types, causing skipped runs in the Actions UI for workflows that only apply to specific contexts (e.g., issue-only bug investigation pipelines).The
events:field already exists but the docs underexplained the motivation and usage patterns.Changes
reference/command-triggers.md: Expanded "Filtering Command Events" with:issue_commentvspull_request_commentmappingreference/triggers.md: Added inlineevents:example to theslash_command:section so the feature is discoverable without navigating to the full referenceExample