Summary
safe-outputs.create-discussion.labels appears to be accepted in config but not applied to newly created discussions.
What I observed
The create_discussion handler parses config.labels, but those labels are never used when creating the discussion.
Expected behavior
When safe-outputs.create-discussion.labels is configured, created discussions should receive those labels.
Actual behavior
Discussion is created successfully, but no labels are applied.
Reproduction
- Configure workflow safe-outputs with
create-discussion and labels:
safe-outputs:
create-discussion:
category: announcements
labels: [automation, report]
- Emit a valid
create_discussion output item.
- Observe created discussion has no labels.
Code evidence
create_discussion parses labels from config, but does not use them later:
actions/setup/js/create_discussion.cjs:196
- Discussion creation GraphQL mutation only sends
repositoryId, categoryId, title, and body:
actions/setup/js/create_discussion.cjs:405
- By contrast,
create_issue builds and passes labels to API create call:
actions/setup/js/create_issue.cjs:376
actions/setup/js/create_issue.cjs:469
- Schema/docs indicate labels should be attached to created discussions:
pkg/parser/schemas/main_workflow_schema.json:4364
pkg/workflow/create_discussion.go:18
Likely root cause
The discussion creation path lacks a label-attachment step (either during createDiscussion input if supported, or a follow-up mutation to apply labels after creation).
Suggested fix
After discussion creation, resolve label IDs for configured labels and apply them to the created discussion node (or include label IDs directly if supported by the create mutation input).
Impact
Workflows depending on discussion labels for triage, filtering, and close-older-discussions matching do not behave as configured.
Summary
safe-outputs.create-discussion.labelsappears to be accepted in config but not applied to newly created discussions.What I observed
The
create_discussionhandler parsesconfig.labels, but those labels are never used when creating the discussion.Expected behavior
When
safe-outputs.create-discussion.labelsis configured, created discussions should receive those labels.Actual behavior
Discussion is created successfully, but no labels are applied.
Reproduction
create-discussionandlabels:create_discussionoutput item.Code evidence
create_discussionparses labels from config, but does not use them later:actions/setup/js/create_discussion.cjs:196repositoryId,categoryId,title, andbody:actions/setup/js/create_discussion.cjs:405create_issuebuilds and passes labels to API create call:actions/setup/js/create_issue.cjs:376actions/setup/js/create_issue.cjs:469pkg/parser/schemas/main_workflow_schema.json:4364pkg/workflow/create_discussion.go:18Likely root cause
The discussion creation path lacks a label-attachment step (either during
createDiscussioninput if supported, or a follow-up mutation to apply labels after creation).Suggested fix
After discussion creation, resolve label IDs for configured labels and apply them to the created discussion node (or include label IDs directly if supported by the create mutation input).
Impact
Workflows depending on discussion labels for triage, filtering, and close-older-discussions matching do not behave as configured.