(apiURL, uploadURL string)
| 70 | } |
| 71 | |
| 72 | func 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 | |
| 80 | type updateOpenAPICmd struct { |
| 81 | Ref string `kong:"default=main,help=${openapi_ref_help}"` |
no test coverage detected
searching dependent graphs…