buildWorkflowSpecRef builds a workflowspec reference string from components. Format: owner/repo/path@version (e.g., "github/gh-aw/shared/mcp/arxiv.md@abc123") If commitSHA is provided, it takes precedence over version. If neither is provided, returns the path without a version suffix.
(repoSlug, path, commitSHA, version string)
| 22 | // If commitSHA is provided, it takes precedence over version. |
| 23 | // If neither is provided, returns the path without a version suffix. |
| 24 | func buildWorkflowSpecRef(repoSlug, path, commitSHA, version string) string { |
| 25 | workflowSpec := repoSlug + "/" + path |
| 26 | if commitSHA != "" { |
| 27 | workflowSpec += "@" + commitSHA |
| 28 | } else if version != "" { |
| 29 | workflowSpec += "@" + version |
| 30 | } |
| 31 | return workflowSpec |
| 32 | } |
| 33 | |
| 34 | // processImportsWithWorkflowSpec processes imports field in frontmatter and replaces local file references |
| 35 | // with workflowspec format (owner/repo/path@sha) for all imports found. |
no outgoing calls
no test coverage detected