@@ -936,14 +936,12 @@ func GetArtifactsOfRun(ctx *context.APIContext) {
936936 return
937937 }
938938
939- repoName := ctx .Repo .Repository .FullName ()
940-
941939 res := new (api.ActionArtifactsResponse )
942940 res .TotalCount = total
943941
944942 res .Entries = make ([]* api.ActionArtifact , len (artifacts ))
945943 for i := range artifacts {
946- convertedArtifact , err := convert .ToActionArtifact (ctx , repoName , artifacts [i ])
944+ convertedArtifact , err := convert .ToActionArtifact (ctx , ctx . Repo . Repository , artifacts [i ])
947945 if err != nil {
948946 ctx .Error (http .StatusInternalServerError , "ToActionArtifact" , err )
949947 return
@@ -999,14 +997,12 @@ func GetArtifacts(ctx *context.APIContext) {
999997 return
1000998 }
1001999
1002- repoName := ctx .Repo .Repository .FullName ()
1003-
10041000 res := new (api.ActionArtifactsResponse )
10051001 res .TotalCount = total
10061002
10071003 res .Entries = make ([]* api.ActionArtifact , len (artifacts ))
10081004 for i := range artifacts {
1009- convertedArtifact , err := convert .ToActionArtifact (ctx , repoName , artifacts [i ])
1005+ convertedArtifact , err := convert .ToActionArtifact (ctx , ctx . Repo . Repository , artifacts [i ])
10101006 if err != nil {
10111007 ctx .Error (http .StatusInternalServerError , "ToActionArtifact" , err )
10121008 return
@@ -1054,8 +1050,7 @@ func GetArtifact(ctx *context.APIContext) {
10541050 }
10551051
10561052 if actions .IsArtifactV4 (art ) {
1057- repoName := ctx .Repo .Repository .FullName ()
1058- convertedArtifact , err := convert .ToActionArtifact (ctx , repoName , art )
1053+ convertedArtifact , err := convert .ToActionArtifact (ctx , ctx .Repo .Repository , art )
10591054 if err != nil {
10601055 ctx .Error (http .StatusInternalServerError , "ToActionArtifact" , err )
10611056 return
0 commit comments