From 6ce08fa1b01e3b43d684f9629d34be7e6d340c8d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 29 Jun 2026 18:58:19 +0000 Subject: [PATCH 1/3] Initial plan From 715c51d3980109482f24878a330d5853f1e1f28f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 29 Jun 2026 19:14:25 +0000 Subject: [PATCH 2/3] Extract shared safe-output allow/block config Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- pkg/cli/compile_workflow_processor_test.go | 4 ++- pkg/workflow/add_labels.go | 9 +++--- pkg/workflow/assign_milestone.go | 10 +++--- pkg/workflow/assign_to_user.go | 11 +++---- .../compiler_safe_outputs_config_test.go | 32 ++++++++++++++----- .../compiler_safe_outputs_env_test.go | 16 +++++++--- .../compiler_safe_outputs_job_test.go | 16 +++++++--- pkg/workflow/remove_labels.go | 9 +++--- .../safe_outputs_config_generation_test.go | 10 ++++-- pkg/workflow/safe_outputs_parser.go | 12 +++++-- pkg/workflow/safe_outputs_tools_test.go | 8 +++-- pkg/workflow/set_issue_type.go | 8 ++--- pkg/workflow/unassign_from_user.go | 9 +++--- 13 files changed, 99 insertions(+), 55 deletions(-) diff --git a/pkg/cli/compile_workflow_processor_test.go b/pkg/cli/compile_workflow_processor_test.go index e1b5f75c1b5..f7d5754ec47 100644 --- a/pkg/cli/compile_workflow_processor_test.go +++ b/pkg/cli/compile_workflow_processor_test.go @@ -16,7 +16,9 @@ func TestExtractSafeOutputLabels_IncludesLabelCommand(t *testing.T) { AllowedLabels: []string{"triage"}, }, AddLabels: &workflow.AddLabelsConfig{ - Allowed: []string{"automation"}, + SafeOutputAllowBlockConfig: workflow.SafeOutputAllowBlockConfig{ + Allowed: []string{"automation"}, + }, }, }, LabelCommand: []string{"deploy"}, diff --git a/pkg/workflow/add_labels.go b/pkg/workflow/add_labels.go index d542ba3d00f..5ef329493d4 100644 --- a/pkg/workflow/add_labels.go +++ b/pkg/workflow/add_labels.go @@ -8,11 +8,10 @@ var addLabelsLog = logger.New("workflow:add_labels") // AddLabelsConfig holds configuration for adding labels to issues/PRs from agent output type AddLabelsConfig struct { - BaseSafeOutputConfig `yaml:",inline"` - SafeOutputTargetConfig `yaml:",inline"` - SafeOutputFilterConfig `yaml:",inline"` - Allowed []string `yaml:"allowed,omitempty"` // Optional list of allowed label patterns (supports glob patterns like "team-*", "area/*"). Labels will be created if they don't already exist in the repository. If omitted, any labels are allowed (including creating new ones). - Blocked []string `yaml:"blocked,omitempty"` // Optional list of blocked label patterns (supports glob patterns like "~*", "*[bot]"). Labels matching these patterns will be rejected. + BaseSafeOutputConfig `yaml:",inline"` + SafeOutputTargetConfig `yaml:",inline"` + SafeOutputFilterConfig `yaml:",inline"` + SafeOutputAllowBlockConfig `yaml:",inline"` } // parseAddLabelsConfig handles add-labels configuration diff --git a/pkg/workflow/assign_milestone.go b/pkg/workflow/assign_milestone.go index c8f97e61bb3..20685692da5 100644 --- a/pkg/workflow/assign_milestone.go +++ b/pkg/workflow/assign_milestone.go @@ -8,11 +8,11 @@ var assignMilestoneLog = logger.New("workflow:assign_milestone") // AssignMilestoneConfig holds configuration for assigning milestones to issues from agent output type AssignMilestoneConfig struct { - BaseSafeOutputConfig `yaml:",inline"` - SafeOutputTargetConfig `yaml:",inline"` - SafeOutputFilterConfig `yaml:",inline"` - Allowed []string `yaml:"allowed,omitempty"` // Optional list of allowed milestone titles or IDs - AutoCreate bool `yaml:"auto_create,omitempty"` // If true, auto-create missing milestones found in the allowed list + BaseSafeOutputConfig `yaml:",inline"` + SafeOutputTargetConfig `yaml:",inline"` + SafeOutputFilterConfig `yaml:",inline"` + SafeOutputAllowBlockConfig `yaml:",inline"` + AutoCreate bool `yaml:"auto_create,omitempty"` // If true, auto-create missing milestones found in the allowed list } // parseAssignMilestoneConfig handles assign-milestone configuration diff --git a/pkg/workflow/assign_to_user.go b/pkg/workflow/assign_to_user.go index e9ba3069bcd..a48c3ac2465 100644 --- a/pkg/workflow/assign_to_user.go +++ b/pkg/workflow/assign_to_user.go @@ -8,12 +8,11 @@ var assignToUserLog = logger.New("workflow:assign_to_user") // AssignToUserConfig holds configuration for assigning users to issues from agent output type AssignToUserConfig struct { - BaseSafeOutputConfig `yaml:",inline"` - SafeOutputTargetConfig `yaml:",inline"` - SafeOutputFilterConfig `yaml:",inline"` - Allowed []string `yaml:"allowed,omitempty"` // Optional list of allowed usernames. If omitted, any users are allowed. - Blocked []string `yaml:"blocked,omitempty"` // Optional list of blocked usernames or patterns (e.g., "copilot", "*[bot]") - UnassignFirst *string `yaml:"unassign-first,omitempty"` // If true, unassign all current assignees before assigning new ones + BaseSafeOutputConfig `yaml:",inline"` + SafeOutputTargetConfig `yaml:",inline"` + SafeOutputFilterConfig `yaml:",inline"` + SafeOutputAllowBlockConfig `yaml:",inline"` + UnassignFirst *string `yaml:"unassign-first,omitempty"` // If true, unassign all current assignees before assigning new ones } // parseAssignToUserConfig handles assign-to-user configuration diff --git a/pkg/workflow/compiler_safe_outputs_config_test.go b/pkg/workflow/compiler_safe_outputs_config_test.go index 0f7e4ca16fb..a78f27d4b66 100644 --- a/pkg/workflow/compiler_safe_outputs_config_test.go +++ b/pkg/workflow/compiler_safe_outputs_config_test.go @@ -95,7 +95,9 @@ func TestAddHandlerManagerConfigEnvVar(t *testing.T) { name: "add labels config", safeOutputs: &SafeOutputsConfig{ AddLabels: &AddLabelsConfig{ - Allowed: []string{"bug", "enhancement", "documentation"}, + SafeOutputAllowBlockConfig: SafeOutputAllowBlockConfig{ + Allowed: []string{"bug", "enhancement", "documentation"}, + }, }, }, checkContains: []string{ @@ -228,7 +230,9 @@ func TestAddHandlerManagerConfigEnvVar(t *testing.T) { }, }, AddLabels: &AddLabelsConfig{ - Allowed: []string{"bug"}, + SafeOutputAllowBlockConfig: SafeOutputAllowBlockConfig{ + Allowed: []string{"bug"}, + }, }, }, checkContains: []string{ @@ -346,7 +350,9 @@ func TestAddHandlerManagerConfigEnvVar(t *testing.T) { name: "remove_labels config", safeOutputs: &SafeOutputsConfig{ RemoveLabels: &RemoveLabelsConfig{ - Allowed: []string{"bug", "wontfix"}, + SafeOutputAllowBlockConfig: SafeOutputAllowBlockConfig{ + Allowed: []string{"bug", "wontfix"}, + }, }, }, checkContains: []string{ @@ -725,7 +731,9 @@ func TestAddHandlerManagerConfigEnvVar(t *testing.T) { BaseSafeOutputConfig: BaseSafeOutputConfig{ Max: strPtr("5"), }, - Allowed: []string{"user1", "user2"}, + SafeOutputAllowBlockConfig: SafeOutputAllowBlockConfig{ + Allowed: []string{"user1", "user2"}, + }, }, }, checkContains: []string{ @@ -2088,7 +2096,9 @@ func TestHandlerConfigAssignToUser(t *testing.T) { TargetRepoSlug: "org/target-repo", AllowedRepos: []string{"org/repo1", "org/repo2"}, }, - Allowed: []string{"user1", "user2", "copilot"}, + SafeOutputAllowBlockConfig: SafeOutputAllowBlockConfig{ + Allowed: []string{"user1", "user2", "copilot"}, + }, }, }, } @@ -2217,7 +2227,9 @@ func TestHandlerConfigUnassignFromUser(t *testing.T) { TargetRepoSlug: "org/target-repo", AllowedRepos: []string{"org/repo1"}, }, - Allowed: []string{"githubactionagent", "bot-user"}, + SafeOutputAllowBlockConfig: SafeOutputAllowBlockConfig{ + Allowed: []string{"githubactionagent", "bot-user"}, + }, }, }, } @@ -2291,7 +2303,9 @@ func TestHandlerConfigAssignToUserWithBlocked(t *testing.T) { Target: "*", TargetRepoSlug: "microsoft/vscode", }, - Blocked: []string{"copilot", "*[bot]"}, + SafeOutputAllowBlockConfig: SafeOutputAllowBlockConfig{ + Blocked: []string{"copilot", "*[bot]"}, + }, }, }, } @@ -2341,7 +2355,9 @@ func TestHandlerConfigUnassignFromUserWithBlocked(t *testing.T) { Target: "*", TargetRepoSlug: "microsoft/vscode", }, - Blocked: []string{"copilot", "*[bot]"}, + SafeOutputAllowBlockConfig: SafeOutputAllowBlockConfig{ + Blocked: []string{"copilot", "*[bot]"}, + }, }, }, } diff --git a/pkg/workflow/compiler_safe_outputs_env_test.go b/pkg/workflow/compiler_safe_outputs_env_test.go index 72877f28d9f..0a88fe9028f 100644 --- a/pkg/workflow/compiler_safe_outputs_env_test.go +++ b/pkg/workflow/compiler_safe_outputs_env_test.go @@ -75,7 +75,9 @@ func TestAddAllSafeOutputConfigEnvVars(t *testing.T) { safeOutputs: &SafeOutputsConfig{ Staged: templatableBoolPtr("true"), AddLabels: &AddLabelsConfig{ - Allowed: []string{"bug"}, + SafeOutputAllowBlockConfig: SafeOutputAllowBlockConfig{ + Allowed: []string{"bug"}, + }, }, }, checkContains: []string{ @@ -205,7 +207,9 @@ func TestStagedFlagOnlyAddedOnce(t *testing.T) { }, }, AddLabels: &AddLabelsConfig{ - Allowed: []string{"bug"}, + SafeOutputAllowBlockConfig: SafeOutputAllowBlockConfig{ + Allowed: []string{"bug"}, + }, }, }, } @@ -326,7 +330,9 @@ func TestEnvVarsWithMultipleSafeOutputTypes(t *testing.T) { }, }, AddLabels: &AddLabelsConfig{ - Allowed: []string{"bug", "enhancement"}, + SafeOutputAllowBlockConfig: SafeOutputAllowBlockConfig{ + Allowed: []string{"bug", "enhancement"}, + }, }, UpdateIssues: &UpdateIssuesConfig{}, UpdateDiscussions: &UpdateDiscussionsConfig{}, @@ -516,7 +522,9 @@ func TestAddLabelsTargetRepoStagedBehavior(t *testing.T) { SafeOutputs: &SafeOutputsConfig{ Staged: templatableBoolPtr("true"), AddLabels: &AddLabelsConfig{ - Allowed: []string{"bug"}, + SafeOutputAllowBlockConfig: SafeOutputAllowBlockConfig{ + Allowed: []string{"bug"}, + }, SafeOutputTargetConfig: SafeOutputTargetConfig{ TargetRepoSlug: "org/target", }, diff --git a/pkg/workflow/compiler_safe_outputs_job_test.go b/pkg/workflow/compiler_safe_outputs_job_test.go index acfc71c5a58..d7768088c1b 100644 --- a/pkg/workflow/compiler_safe_outputs_job_test.go +++ b/pkg/workflow/compiler_safe_outputs_job_test.go @@ -92,7 +92,9 @@ func TestBuildConsolidatedSafeOutputsJob(t *testing.T) { }, }, AddLabels: &AddLabelsConfig{ - Allowed: []string{"bug", "enhancement"}, + SafeOutputAllowBlockConfig: SafeOutputAllowBlockConfig{ + Allowed: []string{"bug", "enhancement"}, + }, }, }, expectedJobName: "safe_outputs", @@ -1012,7 +1014,9 @@ func TestGitHubAppTokenStepWithOTLPHeaders(t *testing.T) { }, AddComments: &AddCommentsConfig{}, AddLabels: &AddLabelsConfig{ - Allowed: []string{"bug"}, + SafeOutputAllowBlockConfig: SafeOutputAllowBlockConfig{ + Allowed: []string{"bug"}, + }, }, }, } @@ -1057,7 +1061,9 @@ func TestGitHubAppTokenStepWithOTLPAttributes(t *testing.T) { }, AddComments: &AddCommentsConfig{}, AddLabels: &AddLabelsConfig{ - Allowed: []string{"bug"}, + SafeOutputAllowBlockConfig: SafeOutputAllowBlockConfig{ + Allowed: []string{"bug"}, + }, }, }, } @@ -1102,7 +1108,9 @@ func TestGitHubAppTokenStepWithOTLPHeadersAndAttributes(t *testing.T) { }, AddComments: &AddCommentsConfig{}, AddLabels: &AddLabelsConfig{ - Allowed: []string{"bug"}, + SafeOutputAllowBlockConfig: SafeOutputAllowBlockConfig{ + Allowed: []string{"bug"}, + }, }, }, } diff --git a/pkg/workflow/remove_labels.go b/pkg/workflow/remove_labels.go index d1ae0f6d70d..39c55807610 100644 --- a/pkg/workflow/remove_labels.go +++ b/pkg/workflow/remove_labels.go @@ -8,11 +8,10 @@ var removeLabelsLog = logger.New("workflow:remove_labels") // RemoveLabelsConfig holds configuration for removing labels from issues/PRs from agent output type RemoveLabelsConfig struct { - BaseSafeOutputConfig `yaml:",inline"` - SafeOutputTargetConfig `yaml:",inline"` - SafeOutputFilterConfig `yaml:",inline"` - Allowed []string `yaml:"allowed,omitempty"` // Optional list of allowed label patterns to remove (supports glob patterns like "team-*", "area/*"). If omitted, any labels can be removed. - Blocked []string `yaml:"blocked,omitempty"` // Optional list of blocked label patterns (supports glob patterns like "~*", "*[bot]"). Labels matching these patterns will be rejected. + BaseSafeOutputConfig `yaml:",inline"` + SafeOutputTargetConfig `yaml:",inline"` + SafeOutputFilterConfig `yaml:",inline"` + SafeOutputAllowBlockConfig `yaml:",inline"` } // parseRemoveLabelsConfig handles remove-labels configuration diff --git a/pkg/workflow/safe_outputs_config_generation_test.go b/pkg/workflow/safe_outputs_config_generation_test.go index 7a77c6007c7..a02011c33ba 100644 --- a/pkg/workflow/safe_outputs_config_generation_test.go +++ b/pkg/workflow/safe_outputs_config_generation_test.go @@ -104,7 +104,9 @@ func TestGenerateSafeOutputsConfigActionsCollisionReturnsError(t *testing.T) { SafeOutputs: &SafeOutputsConfig{ // add_labels is a built-in handler that produces a real config object. AddLabels: &AddLabelsConfig{ - Allowed: []string{"bug"}, + SafeOutputAllowBlockConfig: SafeOutputAllowBlockConfig{ + Allowed: []string{"bug"}, + }, }, // A custom action whose normalized name matches the built-in "add_labels" key. Actions: map[string]*SafeOutputActionConfig{ @@ -434,8 +436,10 @@ func TestGenerateSafeOutputsConfigAddLabelsBlocked(t *testing.T) { Target: "*", TargetRepoSlug: "microsoft/vscode", }, - Allowed: []string{"bug", "enhancement"}, - Blocked: []string{"[*]*", "~spam", "stale", "triage-needed"}, + SafeOutputAllowBlockConfig: SafeOutputAllowBlockConfig{ + Allowed: []string{"bug", "enhancement"}, + Blocked: []string{"[*]*", "~spam", "stale", "triage-needed"}, + }, }, }, } diff --git a/pkg/workflow/safe_outputs_parser.go b/pkg/workflow/safe_outputs_parser.go index 0152a5b4b3e..19f2c70e381 100644 --- a/pkg/workflow/safe_outputs_parser.go +++ b/pkg/workflow/safe_outputs_parser.go @@ -26,6 +26,13 @@ type SafeOutputDiscussionFilterConfig struct { RequiredCategory string `yaml:"required-category,omitempty"` // Required category for discussion operations } +// SafeOutputAllowBlockConfig contains common allow/block lists for safe output configurations. +// Embed this in safe output config structs that support optional allowed/blocked value filters. +type SafeOutputAllowBlockConfig struct { + Allowed []string `yaml:"allowed,omitempty"` // Optional list of allowed values + Blocked []string `yaml:"blocked,omitempty"` // Optional list of blocked patterns (supports glob patterns) +} + // CloseJobConfig represents common configuration for close operations (close-issue, close-discussion, close-pull-request) type CloseJobConfig struct { SafeOutputTargetConfig `yaml:",inline"` @@ -34,9 +41,8 @@ type CloseJobConfig struct { // ListJobConfig represents common configuration for list-based operations (add-labels, add-reviewer, assign-milestone) type ListJobConfig struct { - SafeOutputTargetConfig `yaml:",inline"` - Allowed []string `yaml:"allowed,omitempty"` // Optional list of allowed values - Blocked []string `yaml:"blocked,omitempty"` // Optional list of blocked patterns (supports glob patterns) + SafeOutputTargetConfig `yaml:",inline"` + SafeOutputAllowBlockConfig `yaml:",inline"` } // ParseTargetConfig parses target and target-repo fields from a config map. diff --git a/pkg/workflow/safe_outputs_tools_test.go b/pkg/workflow/safe_outputs_tools_test.go index 6ff57be4652..4163ff7cb0d 100644 --- a/pkg/workflow/safe_outputs_tools_test.go +++ b/pkg/workflow/safe_outputs_tools_test.go @@ -91,7 +91,9 @@ func TestEnhanceToolDescription(t *testing.T) { safeOutputs: &SafeOutputsConfig{ AddLabels: &AddLabelsConfig{ BaseSafeOutputConfig: BaseSafeOutputConfig{Max: strPtr("5")}, - Allowed: []string{"bug", "enhancement", "question"}, + SafeOutputAllowBlockConfig: SafeOutputAllowBlockConfig{ + Allowed: []string{"bug", "enhancement", "question"}, + }, }, }, wantContains: []string{ @@ -107,7 +109,9 @@ func TestEnhanceToolDescription(t *testing.T) { safeOutputs: &SafeOutputsConfig{ AddLabels: &AddLabelsConfig{ BaseSafeOutputConfig: BaseSafeOutputConfig{Max: strPtr("3")}, - Allowed: []string{"bug", "feature request", "good first issue", "help wanted"}, + SafeOutputAllowBlockConfig: SafeOutputAllowBlockConfig{ + Allowed: []string{"bug", "feature request", "good first issue", "help wanted"}, + }, }, }, wantContains: []string{ diff --git a/pkg/workflow/set_issue_type.go b/pkg/workflow/set_issue_type.go index 2f0ff7d902c..5baac303a0a 100644 --- a/pkg/workflow/set_issue_type.go +++ b/pkg/workflow/set_issue_type.go @@ -8,10 +8,10 @@ var setIssueTypeLog = logger.New("workflow:set_issue_type") // SetIssueTypeConfig holds configuration for setting the type of an issue from agent output type SetIssueTypeConfig struct { - BaseSafeOutputConfig `yaml:",inline"` - SafeOutputTargetConfig `yaml:",inline"` - SafeOutputFilterConfig `yaml:",inline"` - Allowed []string `yaml:"allowed,omitempty"` // Optional list of allowed issue type names. If omitted, any type is allowed (including clearing with ""). + BaseSafeOutputConfig `yaml:",inline"` + SafeOutputTargetConfig `yaml:",inline"` + SafeOutputFilterConfig `yaml:",inline"` + SafeOutputAllowBlockConfig `yaml:",inline"` } // parseSetIssueTypeConfig handles set-issue-type configuration diff --git a/pkg/workflow/unassign_from_user.go b/pkg/workflow/unassign_from_user.go index a38415a0a09..7189ee35be1 100644 --- a/pkg/workflow/unassign_from_user.go +++ b/pkg/workflow/unassign_from_user.go @@ -8,11 +8,10 @@ var unassignFromUserLog = logger.New("workflow:unassign_from_user") // UnassignFromUserConfig holds configuration for removing assignees from issues type UnassignFromUserConfig struct { - BaseSafeOutputConfig `yaml:",inline"` - SafeOutputTargetConfig `yaml:",inline"` - SafeOutputFilterConfig `yaml:",inline"` - Allowed []string `yaml:"allowed,omitempty"` // Optional list of allowed usernames. If omitted, any users can be unassigned. - Blocked []string `yaml:"blocked,omitempty"` // Optional list of blocked usernames or patterns (e.g., "copilot", "*[bot]") + BaseSafeOutputConfig `yaml:",inline"` + SafeOutputTargetConfig `yaml:",inline"` + SafeOutputFilterConfig `yaml:",inline"` + SafeOutputAllowBlockConfig `yaml:",inline"` } // parseUnassignFromUserConfig handles unassign-from-user configuration From 4077c35cceaad8788078a36eac64515fcd888ff5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 29 Jun 2026 20:25:53 +0000 Subject: [PATCH 3/3] Fix silent blocked field exposure and integration test compile error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - SetIssueTypeConfig: revert to direct Allowed field; handler registry only serializes allowed, so embedding SafeOutputAllowBlockConfig would silently accept (and ignore) a blocked: YAML key - AssignMilestoneConfig: same fix — keep direct Allowed field - safe_outputs_integration_test.go: update AssignToUserConfig composite literal to use SafeOutputAllowBlockConfig{} embedded struct syntax, fixing the go vet / integration build error Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com> --- .../agentic-workflows-dashboard/src/dashboard-cli.ts | 9 +-------- pkg/workflow/assign_milestone.go | 10 +++++----- pkg/workflow/safe_outputs_integration_test.go | 4 +++- pkg/workflow/set_issue_type.go | 8 ++++---- 4 files changed, 13 insertions(+), 18 deletions(-) diff --git a/.github/extensions/agentic-workflows-dashboard/src/dashboard-cli.ts b/.github/extensions/agentic-workflows-dashboard/src/dashboard-cli.ts index 6c7a0d349ed..e9d5cca3c18 100644 --- a/.github/extensions/agentic-workflows-dashboard/src/dashboard-cli.ts +++ b/.github/extensions/agentic-workflows-dashboard/src/dashboard-cli.ts @@ -157,14 +157,7 @@ async function findDevBinary(cwd: string, accessFn: AccessLike = access, platfor } } -export function createGhAwRunner({ - getWorkspacePath, - accessFn = access, - execFileFn = spawnExecFile, - platform = process.platform, - env = process.env, - resolveBin, -}: RunnerOptions): (args: string[]) => Promise { +export function createGhAwRunner({ getWorkspacePath, accessFn = access, execFileFn = spawnExecFile, platform = process.platform, env = process.env, resolveBin }: RunnerOptions): (args: string[]) => Promise { // Memoize per cwd so findDevBinary is called at most once per workspace path. const binCache = new Map>(); const _resolveBin = diff --git a/pkg/workflow/assign_milestone.go b/pkg/workflow/assign_milestone.go index 20685692da5..c8f97e61bb3 100644 --- a/pkg/workflow/assign_milestone.go +++ b/pkg/workflow/assign_milestone.go @@ -8,11 +8,11 @@ var assignMilestoneLog = logger.New("workflow:assign_milestone") // AssignMilestoneConfig holds configuration for assigning milestones to issues from agent output type AssignMilestoneConfig struct { - BaseSafeOutputConfig `yaml:",inline"` - SafeOutputTargetConfig `yaml:",inline"` - SafeOutputFilterConfig `yaml:",inline"` - SafeOutputAllowBlockConfig `yaml:",inline"` - AutoCreate bool `yaml:"auto_create,omitempty"` // If true, auto-create missing milestones found in the allowed list + BaseSafeOutputConfig `yaml:",inline"` + SafeOutputTargetConfig `yaml:",inline"` + SafeOutputFilterConfig `yaml:",inline"` + Allowed []string `yaml:"allowed,omitempty"` // Optional list of allowed milestone titles or IDs + AutoCreate bool `yaml:"auto_create,omitempty"` // If true, auto-create missing milestones found in the allowed list } // parseAssignMilestoneConfig handles assign-milestone configuration diff --git a/pkg/workflow/safe_outputs_integration_test.go b/pkg/workflow/safe_outputs_integration_test.go index fb16eb8993e..9713c3f82a5 100644 --- a/pkg/workflow/safe_outputs_integration_test.go +++ b/pkg/workflow/safe_outputs_integration_test.go @@ -185,7 +185,9 @@ func TestConsolidatedSafeOutputsJobIntegration(t *testing.T) { configBuilder: func() *SafeOutputsConfig { return &SafeOutputsConfig{ AssignToUser: &AssignToUserConfig{ - Allowed: []string{"user1"}, + SafeOutputAllowBlockConfig: SafeOutputAllowBlockConfig{ + Allowed: []string{"user1"}, + }, }, } }, diff --git a/pkg/workflow/set_issue_type.go b/pkg/workflow/set_issue_type.go index 5baac303a0a..2f0ff7d902c 100644 --- a/pkg/workflow/set_issue_type.go +++ b/pkg/workflow/set_issue_type.go @@ -8,10 +8,10 @@ var setIssueTypeLog = logger.New("workflow:set_issue_type") // SetIssueTypeConfig holds configuration for setting the type of an issue from agent output type SetIssueTypeConfig struct { - BaseSafeOutputConfig `yaml:",inline"` - SafeOutputTargetConfig `yaml:",inline"` - SafeOutputFilterConfig `yaml:",inline"` - SafeOutputAllowBlockConfig `yaml:",inline"` + BaseSafeOutputConfig `yaml:",inline"` + SafeOutputTargetConfig `yaml:",inline"` + SafeOutputFilterConfig `yaml:",inline"` + Allowed []string `yaml:"allowed,omitempty"` // Optional list of allowed issue type names. If omitted, any type is allowed (including clearing with ""). } // parseSetIssueTypeConfig handles set-issue-type configuration