docs: add slash command guidance for SideRepoOps pattern#25401
docs: add slash command guidance for SideRepoOps pattern#25401
Conversation
- Add "Slash Commands" section to side-repo-ops.mdx explaining why slash_command triggers cannot be used directly in SideRepoOps, the recommended relay/bridge pattern, and trade-offs between approaches - Add "Slash Commands in SideRepoOps" callout to command-triggers.md with a concise explanation and link to the full guidance - Update Related links in both files to cross-reference each other and ChatOps pattern page Agent-Logs-Url: https://github.com/github/gh-aw/sessions/ce0c2c78-d96c-44db-a310-4a35c7e3cc4b Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot review updates for accuracy, clarity. Use unbloat agent |
There was a problem hiding this comment.
Pull request overview
Adds documentation guidance clarifying why slash_command: triggers don’t work in the SideRepoOps pattern, and introduces a recommended “bridge/relay” approach with cross-references between the SideRepoOps pattern page and the Command Triggers reference.
Changes:
- Adds a “Slash Commands” section to the SideRepoOps pattern page explaining the GitHub Actions event-delivery constraint and a relay/bridge approach.
- Adds a “Slash Commands in SideRepoOps” section to the Command Triggers reference, linking to the full pattern walkthrough.
- Updates related-links sections to cross-reference SideRepoOps, ChatOps, and Command Triggers.
Show a summary per file
| File | Description |
|---|---|
| docs/src/content/docs/reference/command-triggers.md | Adds a discovery-time callout explaining SideRepoOps incompatibility and links to the pattern walkthrough. |
| docs/src/content/docs/patterns/side-repo-ops.mdx | Adds a detailed “Slash Commands” section with a proposed bridge pattern and trade-off table; updates related links. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 2
| workflow-dispatch: | ||
| target-repo: "my-org/automation-repo" | ||
| workflow: "review.md" | ||
| inputs: | ||
| source_repo: "my-org/main-repo" | ||
| pr_number: "${{ github.event.issue.number }}" | ||
| comment_body: "${{ steps.sanitized.outputs.text }}" |
There was a problem hiding this comment.
The relay workflow example uses safe-outputs.workflow-dispatch, but the supported safe output type is dispatch-workflow (see docs/src/content/docs/reference/safe-outputs.md “Workflow Dispatch (dispatch-workflow:)”). As written, this frontmatter won’t compile/work because workflow-dispatch (and the workflow: "review.md" field) aren’t recognized; dispatch-workflow expects a workflows: [...] allowlist (workflow names without the .md extension) plus optional target-repo/target-ref for cross-repo dispatch. Also note that dispatch inputs are provided by the agent when invoking the generated dispatch tool, not via a static inputs: map in the safe-outputs config.
| workflow-dispatch: | |
| target-repo: "my-org/automation-repo" | |
| workflow: "review.md" | |
| inputs: | |
| source_repo: "my-org/main-repo" | |
| pr_number: "${{ github.event.issue.number }}" | |
| comment_body: "${{ steps.sanitized.outputs.text }}" | |
| dispatch-workflow: | |
| target-repo: "my-org/automation-repo" | |
| workflows: ["review"] |
| workflow: "review.md" | ||
| inputs: | ||
| source_repo: "my-org/main-repo" | ||
| pr_number: "${{ github.event.issue.number }}" |
There was a problem hiding this comment.
In the relay example, pr_number is set to github.event.issue.number, but on: /review defaults to multiple slash command event contexts (including pull_request / pull_request_review_comment) where github.event.issue.number is not present. Either restrict slash_command.events to contexts that guarantee issue.number (e.g., pull_request_comment only), or use a fallback expression that also handles PR events (e.g., github.event.pull_request.number).
| pr_number: "${{ github.event.issue.number }}" | |
| pr_number: "${{ github.event.issue.number || github.event.pull_request.number }}" |
- Remove redundant NOTE callout (constraint already stated in prose) - Remove closing sentence after code examples (self-evident) - Remove "When to choose" bullet list (duplicates trade-offs table) - Tighten command-triggers.md callout paragraph - Remove redundant parenthetical from Related Documentation link Agent-Logs-Url: https://github.com/github/gh-aw/sessions/6f87cdf1-4787-497c-82bf-774a0a2eeebe Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in f774f68. Removed: the NOTE callout (constraint already stated in the preceding sentence), the closing sentence after the code examples (self-evident), and the "When to choose each approach" bullet list (duplicate of the trade-offs table). Also tightened the callout paragraph in |
Added Bridge Pattern as a new glossary entry under Advanced Features. This term was introduced in the slash command guidance for SideRepoOps (PR #25401) and describes the relay workflow architecture for cross-repository event forwarding. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The SideRepoOps pattern page and Command Triggers reference had no cross-references and no guidance on why
slash_command:triggers are incompatible with SideRepoOps — leaving users to discover the GitHub Actions event-delivery constraint on their own.Changes
patterns/side-repo-ops.mdx— new "Slash Commands" section:workflow_dispatch:reference/command-triggers.md— new "Slash Commands in SideRepoOps" section:Related links updated in both files to cross-reference each other and the ChatOps pattern.