MCPcopy Create free account
hub / github.com/cli/cli / parseScriptFilter

Function parseScriptFilter

acceptance/scriptfilter_test.go:11–19  ·  view source on GitHub ↗

parseScriptFilter splits a comma-separated GH_ACCEPTANCE_SCRIPT value into individual script names, trimming whitespace and ignoring empty entries.

(raw string)

Source from the content-addressed store, hash-verified

9// parseScriptFilter splits a comma-separated GH_ACCEPTANCE_SCRIPT value into
10// individual script names, trimming whitespace and ignoring empty entries.
11func parseScriptFilter(raw string) []string {
12 var scripts []string
13 for s := range strings.SplitSeq(raw, ",") {
14 if s = strings.TrimSpace(s); s != "" {
15 scripts = append(scripts, s)
16 }
17 }
18 return scripts
19}
20
21// selectScripts returns the script files under testdata/command that match the
22// requested names, and reports whether a filter was applied (i.e. scripts is

Callers 2

fromEnvMethod · 0.85
TestParseScriptFilterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected