Update community branch (#13208)
Co-authored-by: Hannah Cooper <hannah.cooper@portainer.io> Co-authored-by: Chaim Lev-Ari <chiptus@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Ali <83188384+testA113@users.noreply.github.com> Co-authored-by: Steven Kang <skan070@gmail.com> Co-authored-by: Josiah Clumont <josiah.clumont@portainer.io> Co-authored-by: nickl-portainer <nicholas.loomans@portainer.io> Co-authored-by: andres-portainer <91705312+andres-portainer@users.noreply.github.com> Co-authored-by: Oscar Zhou <100548325+oscarzhou-portainer@users.noreply.github.com> Co-authored-by: ferreiraborgesaxel-design <ferreiraborgesaxel-design@users.noreply.github.com>
This commit is contained in:
@@ -104,7 +104,7 @@ func (h *Handler) gitSourceUpdate(w http.ResponseWriter, r *http.Request) *httpe
|
||||
return httperror.InternalServerError("Unable to update source", err)
|
||||
}
|
||||
|
||||
src.GitConfig = gittypes.SanitizeRepoConfig(src.GitConfig)
|
||||
src.Git = gittypes.SanitizeRepoConfig(src.Git)
|
||||
|
||||
return response.JSON(w, src)
|
||||
}
|
||||
@@ -119,7 +119,7 @@ func ApplyGitSourceChanges(src *portainer.Source, payload GitSourceUpdatePayload
|
||||
src.Name = *payload.Name
|
||||
}
|
||||
|
||||
gitConfig := src.GitConfig
|
||||
gitConfig := src.Git
|
||||
if gitConfig == nil {
|
||||
gitConfig = &gittypes.RepoConfig{}
|
||||
}
|
||||
@@ -167,7 +167,7 @@ func ApplyGitSourceChanges(src *portainer.Source, payload GitSourceUpdatePayload
|
||||
}
|
||||
|
||||
gitConfig.Authentication = auth
|
||||
src.GitConfig = gitConfig
|
||||
src.Git = gitConfig
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user