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

Function mutableStringSlice

pkg/cli/outcome_eval_update.go:197–219  ·  view source on GitHub ↗
(raw any)

Source from the content-addressed store, hash-verified

195}
196
197func mutableStringSlice(raw any) []string {
198 switch values := raw.(type) {
199 case []string:
200 out := slices.Clone(values)
201 for i := range out {
202 out[i] = strings.TrimSpace(out[i])
203 }
204 slices.Sort(out)
205 return out
206 case []any:
207 out := make([]string, 0, len(values))
208 for _, value := range values {
209 s := strings.TrimSpace(fmt.Sprint(value))
210 if s != "" {
211 out = append(out, s)
212 }
213 }
214 slices.Sort(out)
215 return out
216 default:
217 return nil
218 }
219}
220
221func extractCurrentIssueUpdateState(repo string, number int) (map[string]any, bool, error) {
222 issue, err := outcomeUpdateGHAPIGet(fmt.Sprintf("issues/%d", number), repo)

Callers 1

mutableStateEqualFunction · 0.85

Calls 1

CloneMethod · 0.45

Tested by

no test coverage detected