MCPcopy Create free account
hub / github.com/github/gh-aw / getActionPin

Function getActionPin

pkg/workflow/action_pins.go:76–83  ·  view source on GitHub ↗

getActionPin returns the pinned reference for the latest version of the repo using only the embedded pins (no WorkflowData required).

(repo string)

Source from the content-addressed store, hash-verified

74// getActionPin returns the pinned reference for the latest version of the repo
75// using only the embedded pins (no WorkflowData required).
76func getActionPin(repo string) string {
77 pins := actionpins.GetActionPinsByRepo(repo)
78 if len(pins) == 0 {
79 actionPinsLog.Printf("No embedded pins found for repo: %s", repo)
80 return ""
81 }
82 return actionpins.FormatPinnedActionReference(repo, pins[0].SHA, pins[0].Version)
83}
84
85// getActionPin returns the pinned reference for the given repo, using GHES-compatible
86// v3.x pins for artifact actions when c.ghesArtifactCompat is true.

Calls 3

GetActionPinsByRepoFunction · 0.92
PrintfMethod · 0.45