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

Function buildWorkflowSpecRef

pkg/cli/imports.go:24–32  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

22// If commitSHA is provided, it takes precedence over version.
23// If neither is provided, returns the path without a version suffix.
24func 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.

Callers 3

processIncludesInContentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected