diff --git a/pkg/workflow/action_pins_test.go b/pkg/workflow/action_pins_test.go index ac75de30e2..bcb184ba78 100644 --- a/pkg/workflow/action_pins_test.go +++ b/pkg/workflow/action_pins_test.go @@ -264,7 +264,7 @@ func TestApplyActionPinToStep(t *testing.T) { "uses": "actions/checkout@v5", }, expectPinned: true, - expectedUses: "actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5", + expectedUses: "actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1", }, { name: "step with pinned action (setup-node)", @@ -276,7 +276,7 @@ func TestApplyActionPinToStep(t *testing.T) { }, }, expectPinned: true, - expectedUses: "actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6", + expectedUses: "actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0", }, { name: "step with unpinned action", @@ -303,7 +303,7 @@ func TestApplyActionPinToStep(t *testing.T) { "uses": "actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd", }, expectPinned: true, - expectedUses: "actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5", + expectedUses: "actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1", }, } @@ -345,9 +345,9 @@ func TestApplyActionPinToStep(t *testing.T) { func TestGetActionPinsSorting(t *testing.T) { pins := getActionPins() - // Verify we got all the pins (should be 28 after adding super-linter v8.2.1) - if len(pins) != 28 { - t.Errorf("getActionPins() returned %d pins, expected 28", len(pins)) + // Verify we got all the pins (should be 37 after adding specific version entries) + if len(pins) != 37 { + t.Errorf("getActionPins() returned %d pins, expected 37", len(pins)) } // Verify they are sorted by version (descending) then by repository name (ascending) @@ -387,13 +387,13 @@ func TestGetActionPinByRepo(t *testing.T) { repo: "actions/checkout", expectExists: true, expectRepo: "actions/checkout", - expectVer: "v5", + expectVer: "v5.0.1", }, { repo: "actions/setup-node", expectExists: true, expectRepo: "actions/setup-node", - expectVer: "v6", + expectVer: "v6.1.0", }, { repo: "unknown/action", @@ -443,7 +443,7 @@ func TestApplyActionPinToTypedStep(t *testing.T) { Uses: "actions/checkout@v5", }, expectPinned: true, - expectedUses: "actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5", + expectedUses: "actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1", }, { name: "step with pinned action (setup-node)", @@ -455,7 +455,7 @@ func TestApplyActionPinToTypedStep(t *testing.T) { }, }, expectPinned: true, - expectedUses: "actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6", + expectedUses: "actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0", }, { name: "step with unpinned action", @@ -495,7 +495,7 @@ func TestApplyActionPinToTypedStep(t *testing.T) { }, }, expectPinned: true, - expectedUses: "actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5", + expectedUses: "actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1", }, } diff --git a/pkg/workflow/compiler_parse.go b/pkg/workflow/compiler_parse.go index b948b8bb2d..ead7a6f020 100644 --- a/pkg/workflow/compiler_parse.go +++ b/pkg/workflow/compiler_parse.go @@ -769,32 +769,6 @@ func (c *Compiler) copyFrontmatterWithoutInternalMarkers(frontmatter map[string] return copy } -// removeInternalMarkers removes internal marker fields from frontmatter that are used for -// internal processing but should not be validated against the schema -func (c *Compiler) removeInternalMarkers(frontmatter map[string]any) { - // Check if "on" field exists - onValue, exists := frontmatter["on"] - if !exists { - return - } - - // Check if "on" is a map - onMap, ok := onValue.(map[string]any) - if !ok { - return - } - - // Process issues and pull_request sections - for _, sectionKey := range []string{"issues", "pull_request"} { - if sectionValue, hasSec := onMap[sectionKey]; hasSec { - if sectionMap, ok := sectionValue.(map[string]any); ok { - // Remove the marker field - delete(sectionMap, "__gh_aw_native_label_filter__") - } - } - } -} - // detectTextOutputUsage checks if the markdown content uses ${{ needs.activation.outputs.text }} func (c *Compiler) detectTextOutputUsage(markdownContent string) bool { // Check for the specific GitHub Actions expression diff --git a/pkg/workflow/runtime_setup_integration_test.go b/pkg/workflow/runtime_setup_integration_test.go index 189de5b133..d23c8d2bd9 100644 --- a/pkg/workflow/runtime_setup_integration_test.go +++ b/pkg/workflow/runtime_setup_integration_test.go @@ -80,7 +80,7 @@ steps: # Test workflow`, expectSetup: []string{ "Setup uv", - "astral-sh/setup-uv@e58605a9b6da7c637471fab8847a5e5a6b8df081", + "astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86", }, }, { diff --git a/pkg/workflow/runtime_setup_test.go b/pkg/workflow/runtime_setup_test.go index 78d47047b1..d7284c50ed 100644 --- a/pkg/workflow/runtime_setup_test.go +++ b/pkg/workflow/runtime_setup_test.go @@ -318,7 +318,7 @@ func TestGenerateRuntimeSetupSteps(t *testing.T) { expectSteps: 1, checkContent: []string{ "Setup uv", - "astral-sh/setup-uv@e58605a9b6da7c637471fab8847a5e5a6b8df081", + "astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86", }, }, { @@ -354,7 +354,7 @@ func TestGenerateRuntimeSetupSteps(t *testing.T) { expectSteps: 1, checkContent: []string{ "Setup Elixir", - "erlef/setup-beam@3559ac3b631a9560f28817e8e7fdde1638664336", + "erlef/setup-beam@dff508cca8ce57162e7aa6c4769a4f97c2fed638", "elixir-version: '1.17'", }, }, @@ -366,7 +366,7 @@ func TestGenerateRuntimeSetupSteps(t *testing.T) { expectSteps: 1, checkContent: []string{ "Setup Haskell", - "haskell-actions/setup@0b77b13e8a0f222da982de80f02d94f9c058a6ba", + "haskell-actions/setup@782a7c5aa54495c3d21d7c8d5f03a8a2113a1ff7", "ghc-version: '9.10'", }, },