Skip to content

Commit d75d21b

Browse files
authored
Rename ambiguous pkg/actionpins helper to reflect return type (#27201)
1 parent 6e02b86 commit d75d21b

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

pkg/actionpins/actionpins.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,9 @@ func GetActionPinByRepo(repo string) (ActionPin, bool) {
152152
return pins[0], true
153153
}
154154

155-
// getActionPin returns the pinned reference for the latest version of the repo.
155+
// getLatestActionPinReference returns the pinned reference for the latest version of the repo.
156156
// Returns an empty string if no pin is found.
157-
func getActionPin(repo string) string {
157+
func getLatestActionPinReference(repo string) string {
158158
pins := GetActionPinsByRepo(repo)
159159
if len(pins) == 0 {
160160
return ""
@@ -317,18 +317,18 @@ func ResolveActionPin(actionRepo, version string, ctx *PinContext) (string, erro
317317
// If ctx is nil, only embedded pins are consulted.
318318
func ResolveLatestActionPin(repo string, ctx *PinContext) string {
319319
if ctx == nil {
320-
return getActionPin(repo)
320+
return getLatestActionPinReference(repo)
321321
}
322322

323323
pins := GetActionPinsByRepo(repo)
324324
if len(pins) == 0 {
325-
return getActionPin(repo)
325+
return getLatestActionPinReference(repo)
326326
}
327327

328328
latestVersion := pins[0].Version
329329
pinnedRef, err := ResolveActionPin(repo, latestVersion, ctx)
330330
if err != nil || pinnedRef == "" {
331-
return getActionPin(repo)
331+
return getLatestActionPinReference(repo)
332332
}
333333
return pinnedRef
334334
}

0 commit comments

Comments
 (0)