Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions pkg/git/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,17 @@ func NormalizeRepository(str string) (string, string, string, string, string) {
// resolve branch
branch := ""
if match := branchRegEx.FindStringSubmatch(str); match != nil {
str = match[1]
branch = match[2]
// Check if basic auth is used, if so concat the user info and URL
if strings.Contains(match[1], ":") {
str = match[1] + "@" + match[2]
if innerMatch := branchRegEx.FindStringSubmatch(str); innerMatch != nil {
str = innerMatch[1]
branch = innerMatch[2]
}
} else {
str = match[1]
branch = match[2]
}
}

// resolve commit hash
Expand Down
Loading