From c55c1bc6e8f5f4202683d9b6293ef0b66420b145 Mon Sep 17 00:00:00 2001 From: Juan Antonio Osorio Date: Tue, 12 Dec 2023 14:04:13 +0200 Subject: [PATCH] `ghactions list`: skip local references from list This skips local references from the list sub-command, since these are not relevant. We'll parse them anyway and output their inner actions which is what we really care about. We have a similar mechanism for the replacer piece of `ghactions`. Closes: #39 --- pkg/ghactions/ghactions.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/ghactions/ghactions.go b/pkg/ghactions/ghactions.go index d42b028..e0af4a7 100644 --- a/pkg/ghactions/ghactions.go +++ b/pkg/ghactions/ghactions.go @@ -176,6 +176,12 @@ func setOfActions(node *yaml.Node) (mapset.Set[Action], error) { if foundUses { foundUses = false + + // If the value is a local path, skip it + if IsLocal(v.Value) { + continue + } + a, err := parseValue(v.Value) if err != nil { return nil, fmt.Errorf("failed to parse action reference '%s': %w", v.Value, err)