Rename GetActionPinWithData to ResolveActionPin in pkg/actionpins#26657
Rename GetActionPinWithData to ResolveActionPin in pkg/actionpins#26657
GetActionPinWithData to ResolveActionPin in pkg/actionpins#26657Conversation
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/b0a594ce-45e2-452b-bcfb-5b39638d66d8 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
GetActionPinWithData to ResolveActionPin in pkg/actionpins
There was a problem hiding this comment.
Pull request overview
Renames the exported action pin resolution helper in pkg/actionpins to better reflect that it performs resolution (dynamic lookup + embedded fallback), and updates internal call sites/docs accordingly.
Changes:
- Renamed exported API
GetActionPinWithData→ResolveActionPininpkg/actionpins. - Updated internal callers (
pkg/actionpinscache path andpkg/workflowdelegation) to use the new name. - Updated
pkg/actionpins/README.mdpublic API table to reflect the new function name.
Show a summary per file
| File | Description |
|---|---|
| pkg/workflow/action_pins.go | Updates workflow delegation helper to call actionpins.ResolveActionPin. |
| pkg/actionpins/actionpins.go | Renames the exported resolver function and updates internal cache helper call site. |
| pkg/actionpins/README.md | Syncs public API documentation to the renamed function. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 3/3 changed files
- Comments generated: 1
| // ResolveActionPin returns the pinned action reference for a given action@version. | ||
| // It consults ctx.Resolver first, then falls back to embedded pins. | ||
| // If ctx is nil, only embedded pins are consulted. | ||
| func GetActionPinWithData(actionRepo, version string, ctx *PinContext) (string, error) { | ||
| func ResolveActionPin(actionRepo, version string, ctx *PinContext) (string, error) { |
There was a problem hiding this comment.
Renaming this exported function is a breaking API change for any downstream consumers of pkg/actionpins. To preserve backward compatibility (consistent with other deprecated APIs in this repo), consider keeping GetActionPinWithData as a thin wrapper that calls ResolveActionPin, and mark it with a // Deprecated: Use ResolveActionPin. doc comment. If the intention is to break API, this should at least be accompanied by an explicit deprecation/removal plan in release notes.
This updates
pkg/actionpinsnaming to better reflect behavior: the function doesn’t just “get with data,” it resolves a pin via dynamic lookup first, then embedded fallback. The change improves API discoverability without changing resolution logic.API rename (
pkg/actionpins)GetActionPinWithData(actionRepo, version, ctx)→ResolveActionPin(actionRepo, version, ctx)Call-site updates
pkg/actionpins/GetCachedActionPin.pkg/workflowdelegation ingetActionPinWithData(...)to callactionpins.ResolveActionPin(...).Package docs sync
pkg/actionpins/README.mdpublic API table to referenceResolveActionPin.