Skip to content

Commit

Permalink
Fixes git-resolver configuration for serverUrl and scmType
Browse files Browse the repository at this point in the history
With the latest support for multiple git providers in git-resolvers,
it was having a regression issue where if value serverUrl was not given
then it used to return an error

Hence this patch fixes the issue to avoid regression

Signed-off-by: PuneetPunamiya <ppunamiy@redhat.com>
  • Loading branch information
PuneetPunamiya committed Nov 25, 2024
1 parent 85dc300 commit 32f925c
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions pkg/resolution/resolver/git/resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -530,18 +530,12 @@ func getSCMTypeAndServerURL(ctx context.Context, params map[string]string) (stri
}
if scmType == "" {
scmType = conf.SCMType
if scmType == "" {
return "", "", fmt.Errorf("missing or empty %s value in configmap", SCMTypeKey)
}
}
if key, ok := params[ServerURLParam]; ok {
serverURL = key
}
if serverURL == "" {
serverURL = conf.ServerURL
if serverURL == "" {
return "", "", fmt.Errorf("missing or empty %s value in configmap", ServerURLKey)
}
}
return scmType, serverURL, nil
}
Expand Down

0 comments on commit 32f925c

Please sign in to comment.