Fix/multitenancy enterprise url (#1725)

* Fix #1714

* Add Comment
This commit is contained in:
João Carlos Ferra de Almeida 2022-08-16 12:20:06 +01:00 committed by GitHub
parent 3724b46033
commit 36e95dad47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -198,6 +198,12 @@ func (c *MultiGitHubClient) initClientForSecret(secret *corev1.Secret, dependent
return nil, err
}
// Check if EnterpriseURL is set.
if conf.EnterpriseURL == "" {
// fallback to the controller-wide setting
conf.EnterpriseURL = c.githubClient.GithubBaseURL
}
cli, err := conf.NewClient()
if err != nil {
return nil, err