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: site/src/content/docs/reference/safe-outputs.mdx
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,6 +32,10 @@ safe-outputs:
32
32
33
33
Safe output configurations are passed to Stage 3 execution and used when processing safe outputs.
34
34
35
+
:::caution[Compile-time key validation]
36
+
All keys under `safe-outputs:` must match an exact registered tool name (e.g. `create-pull-request`, not `create-pr`). The compiler rejects unknown or misspelled keys with an error listing similar known tools. Key names must use only ASCII letters, digits, and hyphens.
A key under `safe-outputs:` does not match any known tool name. The compiler now rejects unknown keys rather than silently dropping them.
60
+
61
+
```
62
+
safe-outputs contains unrecognised tool name(s):
63
+
- create-pr (similar known tools: create-branch, create-git-tag, create-pull-request, create-wiki-page, create-work-item)
64
+
65
+
Valid safe-output keys are listed in docs/safe-outputs.md. Each key must
66
+
match exactly the kebab-case name registered by a tool in src/safeoutputs/
67
+
(e.g. `create-pull-request`, not `create-pr`).
68
+
```
69
+
70
+
**Solution:** Replace the unrecognised key with the correct tool name shown in the "similar known tools" hint. All tool names use kebab-case and must match exactly:
71
+
72
+
```yaml
73
+
# ✗ Bad — old short-form that used to be silently dropped
74
+
safe-outputs:
75
+
create-pr:
76
+
target-branch: main
77
+
78
+
# ✓ Good — exact registered name
79
+
safe-outputs:
80
+
create-pull-request:
81
+
target-branch: main
82
+
```
83
+
84
+
See the [Safe Outputs reference](/ado-aw/reference/safe-outputs/) for the full list of available tool names.
85
+
86
+
### "safe-outputs contains tool name(s) with invalid characters"
87
+
88
+
A key under `safe-outputs:` contains characters other than ASCII letters, digits, and hyphens.
89
+
90
+
**Solution:** Use only lowercase letters, digits, and hyphens in `safe-outputs:` keys:
91
+
92
+
```yaml
93
+
# ✗ Bad — spaces are not allowed
94
+
safe-outputs:
95
+
create work item: {}
96
+
97
+
# ✓ Good
98
+
safe-outputs:
99
+
create-work-item: {}
100
+
```
101
+
57
102
### "safe-outputs.comment-on-work-item requires a 'target' field"
58
103
59
104
Certain safe-output tools require an explicit `target:` in the front matter configuration. `comment-on-work-item` and `update-work-item` are the most common examples — they need `target:` to scope which work items can be modified.
0 commit comments