Skip to content

Commit 3b38dc9

Browse files
authored
fix: deprecation warning on old git config in PR controller (#506)
1 parent 9d53b23 commit 3b38dc9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

internal/controllers/terraformpullrequest/controller.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,15 +180,16 @@ func (r *Reconciler) initializeProvider(ctx context.Context, repository *configv
180180
return provider, nil
181181
}
182182

183+
// This function initializes default providers for the controller if user has provided legacy configuration
183184
func (r *Reconciler) initializeDefaultProviders() error {
184-
// This initializes default providers for the controller if user has provided legacy configuration
185+
log.Warningf("deprecated GitHub/GitLab configuration found. please configure repositories with secrets instead. See https://padok-team.github.io/burrito/operator-manual/git-authentication/#repository-secret for more information.")
185186
var config = gitprovider.Config{
186187
AppID: r.Config.Controller.GithubConfig.AppId,
187188
AppInstallationID: r.Config.Controller.GithubConfig.InstallationId,
188189
AppPrivateKey: r.Config.Controller.GithubConfig.PrivateKey,
189190
GitHubToken: r.Config.Controller.GithubConfig.APIToken,
190191
GitLabToken: r.Config.Controller.GitlabConfig.APIToken,
191-
URL: "https://github.com",
192+
URL: r.Config.Controller.GitlabConfig.URL,
192193
}
193194

194195
providers, err := gitprovider.ListAvailable(config, []string{gt.Capabilities.Changes, gt.Capabilities.Comment})

0 commit comments

Comments
 (0)