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

Function requiredScopesFromServerMessage

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

Source from the content-addressed store, hash-verified

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

Callers 2

handleErrorFunction · 0.85

Calls

no outgoing calls

Tested by 1