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

Function requiredScopesFromServerMessage

pkg/cmd/project/shared/queries/queries.go:1727–1737  ·  view source on GitHub ↗
(msg string)

Source from the content-addressed store, hash-verified

1725var scopesRE = regexp.MustCompile(`one of the following scopes: \[(.+?)]`)
1726
1727func requiredScopesFromServerMessage(msg string) []string {
1728 m := scopesRE.FindStringSubmatch(msg)
1729 if m == nil {
1730 return nil
1731 }
1732 var scopes []string
1733 for mm := range strings.SplitSeq(m[1], ",") {
1734 scopes = append(scopes, strings.Trim(mm, "' "))
1735 }
1736 return scopes
1737}
1738
1739func projectFieldValueData(v FieldValueNodes) any {
1740 switch v.Type {

Callers 2

handleErrorFunction · 0.85

Calls

no outgoing calls

Tested by 1