diff --git a/pkg/providers/github.go b/pkg/providers/github.go index e37d605..a19db28 100644 --- a/pkg/providers/github.go +++ b/pkg/providers/github.go @@ -85,7 +85,7 @@ func (g *gitHub) GetID() string { func newGitHub(u *url.URL) (Provider, error) { s := strings.Split(u.Path, "/") - if len(s) < 2 { + if len(s) < 3 { return nil, fmt.Errorf("Error parsing Github URL %s, can't find owner and repo", u.String()) } diff --git a/pkg/providers/gitlab.go b/pkg/providers/gitlab.go index 0c159ee..442792d 100644 --- a/pkg/providers/gitlab.go +++ b/pkg/providers/gitlab.go @@ -225,7 +225,7 @@ func (g *gitLab) GetLatestVersion() (string, string, error) { func newGitLab(u *url.URL) (Provider, error) { s := strings.Split(u.Path, "/") - if len(s) < 2 { + if len(s) < 3 { return nil, fmt.Errorf("Error parsing GitLab URL %s, can't find owner and repo", u.String()) }