From 1dc809eca3e9f179aa4703f951eea0746f9cc41b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 22 Feb 2026 14:02:08 +0000 Subject: [PATCH 1/2] Initial plan From 56b3a376fb53f7f3e40b7790fbb5c9075162e17e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 22 Feb 2026 14:07:43 +0000 Subject: [PATCH 2/2] fix: replace strings.Index with strings.Cut to fix stringscut lint violation Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- pkg/workflow/known_needs_expressions.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/workflow/known_needs_expressions.go b/pkg/workflow/known_needs_expressions.go index 068bdc03056..30f26d93184 100644 --- a/pkg/workflow/known_needs_expressions.go +++ b/pkg/workflow/known_needs_expressions.go @@ -142,12 +142,11 @@ func filterExpressionsForActivation(mappings []*ExpressionMapping, customJobs ma } // Extract the job name (needs..*) rest := m.Content[len("needs."):] - dotIdx := strings.Index(rest, ".") - if dotIdx < 0 { + jobName, _, ok := strings.Cut(rest, ".") + if !ok { filtered = append(filtered, m) continue } - jobName := rest[:dotIdx] // If it's a custom job NOT in beforeActivationJobs, drop it if _, isCustomJob := customJobs[jobName]; isCustomJob && !beforeActivationSet[jobName] { knownNeedsLog.Printf("Filtered post-activation expression from activation substitution step: %s", m.Content)