MCPcopy
hub / github.com/cli/cli / requiredScopesFromServerMessage

Function requiredScopesFromServerMessage

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

Source from the content-addressed store, hash-verified

1689var scopesRE = regexp.MustCompile(`one of the following scopes: \[(.+?)]`)
1690
1691func requiredScopesFromServerMessage(msg string) []string {
1692 m := scopesRE.FindStringSubmatch(msg)
1693 if m == nil {
1694 return nil
1695 }
1696 var scopes []string
1697 for _, mm := range strings.Split(m[1], ",") {
1698 scopes = append(scopes, strings.Trim(mm, "' "))
1699 }
1700 return scopes
1701}
1702
1703func projectFieldValueData(v FieldValueNodes) interface{} {
1704 switch v.Type {

Callers 2

handleErrorFunction · 0.85

Calls

no outgoing calls

Tested by 1