From ca535fe7ed3c54fc6609c12b50fa1ace5b8469ee Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 6 Mar 2026 11:08:46 +0000 Subject: [PATCH 1/2] Initial plan From 9e7817b9cde3db22b5700f10a612b5de72daa755 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 6 Mar 2026 11:26:28 +0000 Subject: [PATCH 2/2] Fix failing integration tests: update names type assertion from []string to []any Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .../label_trigger_integration_test.go | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/pkg/workflow/label_trigger_integration_test.go b/pkg/workflow/label_trigger_integration_test.go index d49f131731c..cadb73df47d 100644 --- a/pkg/workflow/label_trigger_integration_test.go +++ b/pkg/workflow/label_trigger_integration_test.go @@ -39,10 +39,16 @@ func TestLabelTriggerIntegrationSimple(t *testing.T) { t.Errorf("issues.types = %v, want [labeled]", types) } - // Check names - names, ok := issues["names"].([]string) + // Check names (stored as []any by expandLabelTriggerShorthand) + namesRaw, ok := issues["names"].([]any) if !ok { - t.Fatalf("issues.names is not a string array") + t.Fatalf("issues.names is not a []any array") + } + var names []string + for _, n := range namesRaw { + if s, isStr := n.(string); isStr { + names = append(names, s) + } } if len(names) != 2 || names[0] != "bug" || names[1] != "enhancement" { t.Errorf("issues.names = %v, want [bug enhancement]", names) @@ -149,10 +155,16 @@ func TestLabelTriggerIntegrationPullRequest(t *testing.T) { t.Errorf("pull_request.types = %v, want [labeled]", types) } - // Check names - names, ok := pr["names"].([]string) + // Check names (stored as []any by expandLabelTriggerShorthand) + namesRaw, ok := pr["names"].([]any) if !ok { - t.Fatalf("pull_request.names is not a string array") + t.Fatalf("pull_request.names is not a []any array") + } + var names []string + for _, n := range namesRaw { + if s, isStr := n.(string); isStr { + names = append(names, s) + } } if len(names) != 2 || names[0] != "needs-review" || names[1] != "approved" { t.Errorf("pull_request.names = %v, want [needs-review approved]", names)