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

Function requiredScopesFromServerMessage

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

Source from the content-addressed store, hash-verified

1736var scopesRE = regexp.MustCompile(`one of the following scopes: \[(.+?)]`)
1737
1738func requiredScopesFromServerMessage(msg string) []string {
1739 m := scopesRE.FindStringSubmatch(msg)
1740 if m == nil {
1741 return nil
1742 }
1743 var scopes []string
1744 for _, mm := range strings.Split(m[1], ",") {
1745 scopes = append(scopes, strings.Trim(mm, "' "))
1746 }
1747 return scopes
1748}
1749
1750func projectFieldValueData(v FieldValueNodes) interface{} {
1751 switch v.Type {

Callers 2

handleErrorFunction · 0.85

Calls

no outgoing calls

Tested by 1