Skip to content

Commit 06c236f

Browse files
[instructions] Sync safe-output docs with dispatch-repository canonical key and close-issue duplicate_of (#43519)
1 parent cabc60e commit 06c236f

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

.github/aw/safe-outputs-automation.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@ description: Safe-output reference for workflow dispatch, code scanning, checks,
7474
```
7575

7676
Triggers other agentic workflows using workflow_dispatch. Agent output includes `workflow_name` (without .md extension) and optional `inputs` (key-value pairs). Cross-repo dispatch is supported via `target-repo` plus an `allowed-repos` allowlist; cross-repo targets require a token with `actions: write` on the target repository.
77-
- `dispatch_repository:` - Dispatch `repository_dispatch` events to external repositories (experimental)
77+
- `dispatch-repository:` - Dispatch `repository_dispatch` events to external repositories (experimental)
7878

7979
```yaml
8080
safe-outputs:
81-
dispatch_repository:
81+
dispatch-repository:
8282
trigger_ci: # Tool name (normalized to MCP tool: trigger_ci)
8383
description: "Trigger CI in target repo"
8484
workflow: ci.yml # Required: target workflow name (for traceability)
@@ -97,7 +97,7 @@ description: Safe-output reference for workflow dispatch, code scanning, checks,
9797
staged: false # Optional: preview-only mode
9898
```
9999

100-
Accepts both `dispatch_repository` (underscore, preferred) and `dispatch-repository` (dash). Each key in the config defines a named MCP tool. Requires a token with `repo` scope since `GITHUB_TOKEN` cannot trigger `repository_dispatch` in external repositories. Use `github-token` or set a PAT as `GH_AW_SAFE_OUTPUTS_TOKEN`.
100+
Accepts both `dispatch-repository` (dash, canonical) and `dispatch_repository` (underscore, deprecated alias). Each key in the config defines a named MCP tool. Requires a token with `repo` scope since `GITHUB_TOKEN` cannot trigger `repository_dispatch` in external repositories. Use `github-token` or set a PAT as `GH_AW_SAFE_OUTPUTS_TOKEN`.
101101

102102
**⚠️ Experimental**: Compilation emits a warning when this feature is used.
103103
- `call-workflow:` - Call reusable workflows via workflow_call fan-out (orchestrator pattern)

.github/aw/safe-outputs-content.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ description: Safe-output reference for issue, discussion, comment, and pull requ
7777

7878
Set `allow-body: false` to guarantee a clean close with no comment — useful when an earlier `add-comment` step already posted the summary and you want to prevent the agent from duplicating it.
7979

80+
To close as a duplicate, the agent emits `duplicate_of` in the `close_issue` output (a bare number, `#N`, `owner/repo#N`, or issue URL) together with `state-reason: duplicate`; this creates a native GitHub duplicate relationship (a `marked_as_duplicate` timeline event) rather than just a comment.
81+
8082
- `create-discussion:` - Safe GitHub discussion creation (status, audits, reports, logs)
8183

8284
```yaml

0 commit comments

Comments
 (0)