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

Function enqueueNestedImportEntry

pkg/parser/import_bfs.go:393–407  ·  view source on GitHub ↗
(entry nestedImportEntry, item importQueueItem, baseDir string, cache *ImportCache, workflowFilePath string, yamlContent string, state *importBFSState)

Source from the content-addressed store, hash-verified

391}
392
393func enqueueNestedImportEntry(entry nestedImportEntry, item importQueueItem, baseDir string, cache *ImportCache, workflowFilePath string, yamlContent string, state *importBFSState) error {
394 nestedImportPath := entry.path
395 nestedFilePath, nestedSectionName := splitImportPathAndSection(nestedImportPath)
396 resolvedPath, nestedRemoteOrigin, err := resolveNestedImportPathAndOrigin(item, nestedFilePath)
397 if err != nil {
398 return err
399 }
400 nestedBaseDir := determineNestedBaseDir(item, resolvedPath, baseDir)
401 nestedFullPath, err := ResolveIncludePath(resolvedPath, nestedBaseDir, cache)
402 if err != nil {
403 return formatNestedResolveError(nestedImportPath, nestedFilePath, item, workflowFilePath, yamlContent, err)
404 }
405 canonicalImportPath := canonicalizeNestedImportPath(nestedImportPath, nestedBaseDir, baseDir, nestedRemoteOrigin, nestedFullPath)
406 return enqueueNestedVisitedPath(state, canonicalImportPath, nestedFullPath, nestedSectionName, baseDir, entry.inputs, nestedRemoteOrigin)
407}
408
409func resolveNestedImportPathAndOrigin(item importQueueItem, nestedFilePath string) (string, *remoteImportOrigin, error) {
410 if item.remoteOrigin != nil && !isWorkflowSpec(nestedFilePath) {

Callers 1

enqueueNestedImportsFunction · 0.85

Calls 7

determineNestedBaseDirFunction · 0.85
formatNestedResolveErrorFunction · 0.85
enqueueNestedVisitedPathFunction · 0.85
ResolveIncludePathFunction · 0.70

Tested by

no test coverage detected