Skip to content

Commit 866a62c

Browse files
authored
Add update-discussion documentation to safe-outputs reference (#8089)
1 parent eb4c2d5 commit 866a62c

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

.github/workflows/org-health-report.lock.yml

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/src/content/docs/reference/safe-outputs.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ The agent requests issue creation; a separate job with `issues: write` creates i
3939
| [**PR Review Comments**](#pr-review-comments-create-pull-request-review-comment) | `create-pull-request-review-comment:` | Create review comments on code lines | 10 | ✅ |
4040
| [**Create Discussion**](#discussion-creation-create-discussion) | `create-discussion:` | Create GitHub discussions | 1 | ✅ |
4141
| [**Close Discussion**](#close-discussion-close-discussion) | `close-discussion:` | Close discussions with comment and resolution | 1 | ✅ |
42+
| [**Update Discussion**](#discussion-updates-update-discussion) | `update-discussion:` | Update discussion title, body, or labels | 1 | ✅ |
4243
| [**Create Agent Task**](#agent-task-creation-create-agent-task) | `create-agent-task:` | Create Copilot agent tasks | 1 | ✅ |
4344
| [**Assign to Agent**](#assign-to-agent-assign-to-agent) | `assign-to-agent:` | Assign Copilot agents to issues | 1 | ✅ |
4445
| [**Assign to User**](#assign-to-user-assign-to-user) | `assign-to-user:` | Assign users to issues | 1 | ✅ |
@@ -397,6 +398,26 @@ safe-outputs:
397398

398399
**Resolution Reasons**: `RESOLVED`, `DUPLICATE`, `OUTDATED`, `ANSWERED`.
399400

401+
### Discussion Updates (`update-discussion:`)
402+
403+
Updates discussion title, body, or labels. Only explicitly enabled fields can be updated.
404+
405+
```yaml wrap
406+
safe-outputs:
407+
update-discussion:
408+
title: # enable title updates
409+
body: # enable body updates
410+
labels: # enable label updates
411+
allowed-labels: [bug, idea] # restrict to specific labels
412+
max: 1 # max updates (default: 1)
413+
target: "*" # "triggering" (default), "*", or number
414+
target-repo: "owner/repo" # cross-repository
415+
```
416+
417+
**Field Enablement**: Include `title:`, `body:`, or `labels:` keys to enable updates for those fields. Without these keys, the field cannot be updated. Setting `allowed-labels` implicitly enables label updates.
418+
419+
**Target**: `"triggering"` (requires discussion event), `"*"` (any discussion), or number (specific discussion).
420+
400421
### Agent Task Creation (`create-agent-task:`)
401422

402423
Creates Copilot agent tasks. Requires `COPILOT_GITHUB_TOKEN` or `GH_AW_GITHUB_TOKEN` PAT—default `GITHUB_TOKEN` lacks permissions.

0 commit comments

Comments
 (0)