(item importQueueItem, nestedFilePath string)
| 407 | } |
| 408 | |
| 409 | func resolveNestedImportPathAndOrigin(item importQueueItem, nestedFilePath string) (string, *remoteImportOrigin, error) { |
| 410 | if item.remoteOrigin != nil && !isWorkflowSpec(nestedFilePath) { |
| 411 | return resolveRemoteNestedPath(item, nestedFilePath) |
| 412 | } |
| 413 | if isWorkflowSpec(nestedFilePath) { |
| 414 | nestedRemoteOrigin := parseRemoteOrigin(nestedFilePath) |
| 415 | if nestedRemoteOrigin != nil { |
| 416 | importLog.Printf("Nested workflowspec import detected: %s (origin: %s/%s@%s)", nestedFilePath, nestedRemoteOrigin.Owner, nestedRemoteOrigin.Repo, nestedRemoteOrigin.Ref) |
| 417 | } |
| 418 | return nestedFilePath, nestedRemoteOrigin, nil |
| 419 | } |
| 420 | return nestedFilePath, nil, nil |
| 421 | } |
| 422 | |
| 423 | func resolveRemoteNestedPath(item importQueueItem, nestedFilePath string) (string, *remoteImportOrigin, error) { |
| 424 | cleanPath := path.Clean(strings.TrimPrefix(nestedFilePath, "./")) |
no test coverage detected