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

Method String

pkg/cli/spec.go:88–105  ·  view source on GitHub ↗

String returns the canonical string representation of the workflow spec in the format "owner/repo/path[@version]", just the WorkflowPath for local specs, or the raw URL for generic URL specs.

()

Source from the content-addressed store, hash-verified

86// in the format "owner/repo/path[@version]", just the WorkflowPath for local
87// specs, or the raw URL for generic URL specs.
88func (w *WorkflowSpec) String() string {
89 // For generic URL specs, return the raw URL.
90 if w.RawURL != "" {
91 return w.RawURL
92 }
93
94 // For local workflows, return just the WorkflowPath
95 if isLocalWorkflowPath(w.WorkflowPath) {
96 return w.WorkflowPath
97 }
98
99 // For remote workflows, use the standard format
100 spec := w.RepoSlug + "/" + w.WorkflowPath
101 if w.Version != "" {
102 spec += "@" + w.Version
103 }
104 return spec
105}
106
107// parseRepoSpec parses repository specification like "org/repo@version" or "org/repo@branch" or "org/repo@commit"
108// Also supports GitHub URLs like "https://github.com/owner/repo[@version]"

Callers 15

normalizeMapFunction · 0.45
FormatDurationNsFunction · 0.45
marshalSortedMapFunction · 0.45
marshalSortedSliceFunction · 0.45
FormatImportCycleErrorFunction · 0.45
toImportsResultMethod · 0.45
resolveRefToSHAFunction · 0.45
normalizeForJSONSchemaFunction · 0.45
FuzzParseFrontmatterFunction · 0.45
generateFieldSuggestionsFunction · 0.45

Calls 1

isLocalWorkflowPathFunction · 0.85