MCPcopy Create free account
hub / github.com/Chat2AnyLLM/code-agent-manager / couldBeGHOwner

Function couldBeGHOwner

internal/cli/management.go:436–453  ·  view source on GitHub ↗

couldBeGHOwner returns true if s looks like a valid GitHub username/org.

(s string)

Source from the content-addressed store, hash-verified

434
435// couldBeGHOwner returns true if s looks like a valid GitHub username/org.
436func couldBeGHOwner(s string) bool {
437 if len(s) == 0 || len(s) > 39 {
438 return false
439 }
440 for i, c := range s {
441 switch {
442 case c >= 'a' && c <= 'z', c >= 'A' && c <= 'Z', c >= '0' && c <= '9':
443 continue
444 case c == '-':
445 if i == 0 || i == len(s)-1 {
446 return false
447 }
448 default:
449 return false
450 }
451 }
452 return true
453}
454
455type ghCodeSearchItem struct {
456 Name string `json:"name"`

Callers 2

TestCouldBeGHOwnerFunction · 0.70
searchGitHubFunction · 0.70

Calls

no outgoing calls

Tested by 1

TestCouldBeGHOwnerFunction · 0.56