From 1e7f5ef7bed706c922b1c4addfb1e7a7ba8ba8ca Mon Sep 17 00:00:00 2001
From: Juan Antonio Osorio <ozz@stacklok.com>
Date: Wed, 22 Nov 2023 09:24:47 +0200
Subject: [PATCH] Add full action name in list

The action list has the repo and the owner of the action, but the fact is that a repo
may hold more than one action at a time. To address this, this adds the actual action
string to the list, which should now hold a unique reference.
---
 pkg/ghactions/ghactions.go | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/pkg/ghactions/ghactions.go b/pkg/ghactions/ghactions.go
index 9bbf9a9..49be771 100644
--- a/pkg/ghactions/ghactions.go
+++ b/pkg/ghactions/ghactions.go
@@ -133,9 +133,10 @@ func ModifyReferencesInYAML(ctx context.Context, ghcli *github.Client, node *yam
 
 // Action represents an action reference.
 type Action struct {
-	Owner string
-	Repo  string
-	Ref   string
+	Action string
+	Owner  string
+	Repo   string
+	Ref    string
 }
 
 // ListActionsInYAML returns a list of actions referenced in the given YAML structure.
@@ -183,9 +184,10 @@ func parseValue(val string) (*Action, error) {
 	}
 
 	return &Action{
-		Owner: owner,
-		Repo:  repo,
-		Ref:   ref,
+		Action: action,
+		Owner:  owner,
+		Repo:   repo,
+		Ref:    ref,
 	}, nil
 }