diff --git a/pkg/cli/workflows/test-copilot-set-issue-field.md b/pkg/cli/workflows/test-copilot-set-issue-field.md new file mode 100644 index 00000000000..8070d71941e --- /dev/null +++ b/pkg/cli/workflows/test-copilot-set-issue-field.md @@ -0,0 +1,27 @@ +--- +on: + workflow_dispatch: +permissions: + contents: read + issues: read +engine: copilot +safe-outputs: + set-issue-field: + max: 5 +timeout-minutes: 5 +--- + +# Test Copilot Set Issue Field + +Test the `set_issue_field` safe output type with the Copilot engine. + +## Task + +Set a custom field on issue #1 in the current repository. + +Use the following parameters: +- **issue_number**: 1 +- **field_name**: "Status" +- **value**: "In Progress" + +Output results in JSONL format using the `set_issue_field` tool. diff --git a/pkg/workflow/compiler_safe_outputs_config_test.go b/pkg/workflow/compiler_safe_outputs_config_test.go index 92176f0b239..cefc6b43a1d 100644 --- a/pkg/workflow/compiler_safe_outputs_config_test.go +++ b/pkg/workflow/compiler_safe_outputs_config_test.go @@ -450,6 +450,27 @@ func TestAddHandlerManagerConfigEnvVar(t *testing.T) { checkJSON: true, expectedKeys: []string{"dispatch_workflow"}, }, + { + name: "dispatch_repository config", + safeOutputs: &SafeOutputsConfig{ + DispatchRepository: &DispatchRepositoryConfig{ + Tools: map[string]*DispatchRepositoryToolConfig{ + "example_tool": { + Description: "Test dispatch", + Workflow: "test-workflow", + EventType: "test_event", + Repository: "github/example", + Max: strPtr("1"), + }, + }, + }, + }, + checkContains: []string{ + "GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG", + }, + checkJSON: true, + expectedKeys: []string{"dispatch_repository"}, + }, { name: "update_discussion config", safeOutputs: &SafeOutputsConfig{