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

Function formatUpdateOrgNoReposMessage

pkg/cli/update_org.go:123–147  ·  view source on GitHub ↗
(workflowNames []string)

Source from the content-addressed store, hash-verified

121}
122
123func formatUpdateOrgNoReposMessage(workflowNames []string) string {
124 if len(workflowNames) == 0 {
125 return "No repositories found with source-managed workflows"
126 }
127
128 filters := make([]string, 0, len(workflowNames))
129 seen := make(map[string]struct{}, len(workflowNames))
130 for _, workflowName := range workflowNames {
131 normalized := normalizeWorkflowID(workflowName)
132 if normalized == "" || normalized == "." {
133 continue
134 }
135 if _, ok := seen[normalized]; ok {
136 continue
137 }
138 seen[normalized] = struct{}{}
139 filters = append(filters, normalized)
140 }
141 if len(filters) == 0 {
142 return "No repositories found with source-managed workflows matching the requested workflow filters"
143 }
144
145 slices.Sort(filters)
146 return "No repositories found with source-managed workflows matching: " + strings.Join(filters, ", ")
147}
148
149// renderOrgPreviewReport prints the discovered updates for each repository. It is
150// intentionally cheap (no API calls) so it can be shown even when a run is stopped

Callers 1

runUpdateForOrgFunction · 0.85

Calls 1

normalizeWorkflowIDFunction · 0.85

Tested by

no test coverage detected