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

Method GetInputs

pkg/workflow/action_cache.go:480–489  ·  view source on GitHub ↗

GetInputs retrieves the cached action inputs for the given repo and version. Returns the inputs map and true if cached inputs exist, otherwise nil and false.

(repo, version string)

Source from the content-addressed store, hash-verified

478// GetInputs retrieves the cached action inputs for the given repo and version.
479// Returns the inputs map and true if cached inputs exist, otherwise nil and false.
480func (c *ActionCache) GetInputs(repo, version string) (map[string]*ActionYAMLInput, bool) {
481 key := formatActionCacheKey(repo, version)
482 entry, exists := c.Entries[key]
483 if !exists || entry.Inputs == nil {
484 actionCacheLog.Printf("No cached inputs for key=%s", key)
485 return nil, false
486 }
487 actionCacheLog.Printf("Cache hit for inputs: key=%s, inputs=%d", key, len(entry.Inputs))
488 return entry.Inputs, true
489}
490
491// SetInputs stores the action inputs in the cache entry for the given repo and version.
492// If no cache entry exists for the key, a new entry is created with an empty SHA so that

Callers 2

TestActionCacheInputsFunction · 0.95

Calls 2

formatActionCacheKeyFunction · 0.85
PrintfMethod · 0.45

Tested by 1

TestActionCacheInputsFunction · 0.76