-
Notifications
You must be signed in to change notification settings - Fork 67
Closed
Description
Using App token authentication with Github Enterprise Server does not work because the base url defaults to github.com even though the custom URL is set.
This is caused by the following code:
github-datasource/pkg/github/client/client.go
Lines 77 to 91 in 8910888
| itr, err := ghinstallation.New(http.DefaultTransport, appId, installationId, []byte(settings.PrivateKey)) | |
| if err != nil { | |
| return nil, backend.DownstreamError(errors.New("error creating token source")) | |
| } | |
| httpClient := &http.Client{Transport: itr} | |
| if settings.GitHubURL == "" { | |
| return &Client{ | |
| restClient: googlegithub.NewClient(httpClient), | |
| graphqlClient: githubv4.NewClient(httpClient), | |
| }, nil | |
| } | |
| return useGitHubEnterprise(httpClient, settings) |
The BaseURL of itr is not updated and defaults to github.com. To do this properly, do it as described here: bradleyfalzon/ghinstallation#90 (comment)
1tft
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Complete