diff --git a/pkg/cli/workflows/test-copilot-create-check-run.md b/pkg/cli/workflows/test-copilot-create-check-run.md new file mode 100644 index 00000000000..19f1be27be5 --- /dev/null +++ b/pkg/cli/workflows/test-copilot-create-check-run.md @@ -0,0 +1,25 @@ +--- +on: + workflow_dispatch: +permissions: + contents: read + checks: write +engine: copilot +safe-outputs: + create-check-run: + max: 1 + name: "Copilot Analysis" +--- + +# Test Copilot Create Check Run + +Test the `create_check_run` safe output type with the Copilot engine. + +## Task + +Create a GitHub Check Run with: +- **conclusion**: "success" +- **title**: "Copilot Analysis Complete" +- **summary**: "The automated analysis completed successfully. No issues were found." + +Output results in JSONL format using the `create_check_run` tool. diff --git a/pkg/workflow/compiler_safe_outputs_config_test.go b/pkg/workflow/compiler_safe_outputs_config_test.go index ae3dd64b64a..b9c413bf5e2 100644 --- a/pkg/workflow/compiler_safe_outputs_config_test.go +++ b/pkg/workflow/compiler_safe_outputs_config_test.go @@ -811,6 +811,22 @@ func TestAddHandlerManagerConfigEnvVar(t *testing.T) { checkJSON: true, expectedKeys: []string{"merge_pull_request"}, }, + { + name: "create_check_run config", + safeOutputs: &SafeOutputsConfig{ + CreateCheckRun: &CreateCheckRunConfig{ + BaseSafeOutputConfig: BaseSafeOutputConfig{ + Max: strPtr("1"), + }, + Name: "Copilot Analysis", + }, + }, + checkContains: []string{ + "GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG", + }, + checkJSON: true, + expectedKeys: []string{"create_check_run"}, + }, { name: "comment_memory config", safeOutputs: &SafeOutputsConfig{