fix(git) EE-2026 git default branch (#6876)

fix(git) EE-2026 git default branch
This commit is contained in:
congs
2022-05-16 09:35:11 +12:00
committed by GitHub
parent 0ffb84aaa6
commit df05914fac
19 changed files with 167 additions and 127 deletions

View File

@@ -4,7 +4,6 @@ import (
"net/http"
"time"
"github.com/asaskevich/govalidator"
"github.com/pkg/errors"
httperror "github.com/portainer/libhttp/error"
"github.com/portainer/libhttp/request"
@@ -26,10 +25,6 @@ type stackGitUpdatePayload struct {
}
func (payload *stackGitUpdatePayload) Validate(r *http.Request) error {
if govalidator.IsNull(payload.RepositoryReferenceName) {
payload.RepositoryReferenceName = defaultGitReferenceName
}
if err := validateStackAutoUpdate(payload.AutoUpdate); err != nil {
return err
}