Skip to content

Commit

Permalink
Update the names of the provider constants.
Browse files Browse the repository at this point in the history
Signed-off-by: Dipti Pai <[email protected]>
  • Loading branch information
dipti-pai committed Aug 26, 2024
1 parent d295272 commit bd58024
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions api/v1/gitrepository_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ const (
// GitRepositoryKind is the string representation of a GitRepository.
GitRepositoryKind = "GitRepository"

// GenericAuthProvider provides support for authentication using
// GitProviderGeneric provides support for authentication using
// credentials specified in secretRef
GenericAuthProvider string = "generic"
GitProviderGeneric string = "generic"

// AzureAuthProvider provides support for authentication to azure
// GitProviderAzure provides support for authentication to azure
// repositories using Managed Identity
AzureAuthProvider string = "azure"
GitProviderAzure string = "azure"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion internal/controller/gitrepository_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ func (r *GitRepositoryReconciler) getAuthOpts(ctx context.Context, obj *sourcev1
}

// Configure provider authentication if specified in spec
if obj.Spec.Provider != "" && obj.Spec.Provider != sourcev1.GenericAuthProvider {
if obj.Spec.Provider != "" && obj.Spec.Provider != sourcev1.GitProviderGeneric {
authOpts.ProviderOpts = &git.ProviderOptions{
Name: obj.Spec.Provider,
}
Expand Down

0 comments on commit bd58024

Please sign in to comment.