Skip to content

Commit d510f01

Browse files
authored
Rename GetActionPinWithData to ResolveActionPin in pkg/actionpins (#26657)
1 parent 643148a commit d510f01

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

pkg/actionpins/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Resolution supports two modes:
3434
| `FormatCacheKey` | `func(repo, version string) string` | Formats a cache key (`repo@version`) |
3535
| `ExtractRepo` | `func(uses string) string` | Extracts the repository from a `uses` reference |
3636
| `ExtractVersion` | `func(uses string) string` | Extracts the version from a `uses` reference |
37-
| `GetActionPinWithData` | `func(actionRepo, version string, ctx *PinContext) (string, error)` | Resolves a pinned reference with optional dynamic SHA lookup and fallback behavior |
37+
| `ResolveActionPin` | `func(actionRepo, version string, ctx *PinContext) (string, error)` | Resolves a pinned reference with optional dynamic SHA lookup and fallback behavior |
3838
| `GetCachedActionPin` | `func(repo string, ctx *PinContext) string` | Returns a pinned reference preferring cache/dynamic resolution when available |
3939

4040
## Dependencies

pkg/actionpins/actionpins.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,10 @@ func findCompatiblePin(pins []ActionPin, version string) (ActionPin, bool) {
213213
return ActionPin{}, false
214214
}
215215

216-
// GetActionPinWithData returns the pinned action reference for a given action@version.
216+
// ResolveActionPin returns the pinned action reference for a given action@version.
217217
// It consults ctx.Resolver first, then falls back to embedded pins.
218218
// If ctx is nil, only embedded pins are consulted.
219-
func GetActionPinWithData(actionRepo, version string, ctx *PinContext) (string, error) {
219+
func ResolveActionPin(actionRepo, version string, ctx *PinContext) (string, error) {
220220
if ctx == nil {
221221
ctx = &PinContext{}
222222
}
@@ -329,7 +329,7 @@ func GetCachedActionPin(repo string, ctx *PinContext) string {
329329
}
330330

331331
latestVersion := pins[0].Version
332-
pinnedRef, err := GetActionPinWithData(repo, latestVersion, ctx)
332+
pinnedRef, err := ResolveActionPin(repo, latestVersion, ctx)
333333
if err != nil || pinnedRef == "" {
334334
return getActionPin(repo)
335335
}

pkg/workflow/action_pins.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ func getActionPinByRepo(repo string) (ActionPin, bool) {
8686
// getActionPinWithData returns the pinned action reference for a given action@version,
8787
// delegating to pkg/actionpins with a PinContext built from WorkflowData.
8888
func getActionPinWithData(actionRepo, version string, data *WorkflowData) (string, error) {
89-
return actionpins.GetActionPinWithData(actionRepo, version, data.PinContext())
89+
return actionpins.ResolveActionPin(actionRepo, version, data.PinContext())
9090
}
9191

9292
// getCachedActionPin returns the pinned action reference for a given repository,

0 commit comments

Comments
 (0)