MCPcopy Index your code
hub / github.com/google/go-github / githubClient

Function githubClient

tools/metadata/main.go:72–78  ·  view source on GitHub ↗
(apiURL, uploadURL string)

Source from the content-addressed store, hash-verified

70}
71
72func githubClient(apiURL, uploadURL string) (*github.Client, error) {
73 token := os.Getenv("GITHUB_TOKEN")
74 if token == "" {
75 return nil, errors.New("GITHUB_TOKEN environment variable must be set to a GitHub personal access token with the public_repo scope")
76 }
77 return github.NewClient(github.WithAuthToken(token), github.WithEnterpriseURLs(apiURL, uploadURL))
78}
79
80type updateOpenAPICmd struct {
81 Ref string `kong:"default=main,help=${openapi_ref_help}"`

Callers 1

RunMethod · 0.85

Calls 3

NewClientFunction · 0.92
WithAuthTokenFunction · 0.92
WithEnterpriseURLsFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…