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
18 changes: 18 additions & 0 deletions docs/src/content/docs/reference/cross-repository.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,24 @@ safe-outputs:

Without `target-repo`, safe outputs operate on the repository where the workflow is running.

### Wildcard Target Repository (`target-repo: "*"`)

Set `target-repo: "*"` to allow the agent to dynamically target any repository at runtime. When configured, the agent receives a `repo` parameter in its tool call where it supplies the target repository in `owner/repo` format:

```yaml wrap
safe-outputs:
github-token: ${{ secrets.CROSS_REPO_PAT }}
create-issue:
target-repo: "*"
title-prefix: "[component] "
```

Use this when the target repository is not known at workflow authoring time — for example, when building a workflow that routes issues to different repositories based on labels or content.

:::caution
The following safe-output types do **not** support `target-repo: "*"`: `create-pull-request-review-comment`, `reply-to-pull-request-review-comment`, `submit-pull-request-review`, `create-agent-session`, and `manage-project-items`. Use an explicit `owner/repo` value or `allowed-repos` for these types.
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

manage-project-items is referenced here as a safe-output type that doesn’t support target-repo: "*", but it doesn’t appear to exist anywhere else in the repository (no code/docs/schema matches). This likely should refer to an actual safe output type that rejects wildcards (e.g., update-project uses wildcard-disallowing parsing) or the item should be removed to avoid documenting a non-existent feature.

Suggested change
The following safe-output types do **not** support `target-repo: "*"`: `create-pull-request-review-comment`, `reply-to-pull-request-review-comment`, `submit-pull-request-review`, `create-agent-session`, and `manage-project-items`. Use an explicit `owner/repo` value or `allowed-repos` for these types.
The following safe-output types do **not** support `target-repo: "*"`: `create-pull-request-review-comment`, `reply-to-pull-request-review-comment`, and `submit-pull-request-review`, and `create-agent-session`. Use an explicit `owner/repo` value or `allowed-repos` for these types.

Copilot uses AI. Check for mistakes.
:::

### Allowed Repositories (`allowed-repos`)

Allow the agent to dynamically select from multiple repositories:
Expand Down
8 changes: 5 additions & 3 deletions docs/src/content/docs/reference/safe-outputs.md
Original file line number Diff line number Diff line change
Expand Up @@ -1343,10 +1343,12 @@ safe-outputs:

Most safe outputs support cross-repository operations:

- **`target-repo`**: Set a default target repository for all operations of this type
- **`allowed-repos`**: Allow the agent to dynamically choose which repository to target (from an allowlist)
- **`target-repo`**: Set a fixed target repository (`owner/repo` format), or use `"*"` as a wildcard to let the agent supply any repository at runtime.
- **`allowed-repos`**: Allow the agent to dynamically choose from an allowlist of repositories (supports glob patterns, e.g. `org/*`).

See [Cross-Repository Operations](/gh-aw/reference/cross-repository/) technical details.
Using `target-repo: "*"` enables fully dynamic routing — the agent provides the `repo` field in each tool call. Note that `create-pull-request-review-comment`, `reply-to-pull-request-review-comment`, `submit-pull-request-review`, `create-agent-session`, and `manage-project-items` do not support the wildcard; use an explicit repository or `allowed-repos` for those types.
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

manage-project-items appears to be an invalid/nonexistent safe-output type name in this repo (no other references in code or docs). This makes the wildcard support guidance misleading. Consider replacing it with update-project (which explicitly disallows target-repo: "*" in the Update Project section) or removing it if it’s not a safe output type.

Suggested change
Using `target-repo: "*"` enables fully dynamic routing — the agent provides the `repo` field in each tool call. Note that `create-pull-request-review-comment`, `reply-to-pull-request-review-comment`, `submit-pull-request-review`, `create-agent-session`, and `manage-project-items` do not support the wildcard; use an explicit repository or `allowed-repos` for those types.
Using `target-repo: "*"` enables fully dynamic routing — the agent provides the `repo` field in each tool call. Note that `create-pull-request-review-comment`, `reply-to-pull-request-review-comment`, `submit-pull-request-review`, `create-agent-session`, and `update-project` do not support the wildcard; use an explicit repository or `allowed-repos` for those types.

Copilot uses AI. Check for mistakes.

See [Cross-Repository Operations](/gh-aw/reference/cross-repository/) for comprehensive documentation.

## Global Configuration Options

Expand Down
Loading