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

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