Skip to content

Commit

Permalink
added http protocol support for gitlab repositories (trufflesecurity#662
Browse files Browse the repository at this point in the history
)
  • Loading branch information
arielril authored Jul 20, 2022
1 parent 3b65587 commit 2515fbe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/giturl/giturl.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ func NormalizeGithubRepo(repoURL string) (string, error) {
}

func NormalizeGitlabRepo(repoURL string) (string, error) {
if !strings.HasPrefix(repoURL, "https") {
return "", errors.New("Gitlab requires https repo urls: e.g. https://gitlab.com/org/repo.git")
if !strings.HasPrefix(repoURL, "http:") && !strings.HasPrefix(repoURL, "https:") {
return "", errors.New("Gitlab requires http/https repo urls: e.g. https://gitlab.com/org/repo.git")
}

return NormalizeOrgRepoURL("Gitlab", repoURL)
Expand Down

0 comments on commit 2515fbe

Please sign in to comment.