From 0eb3090ad6200f59e7164d9ca6d5e9b597162569 Mon Sep 17 00:00:00 2001 From: William Wagner Moraes Artero Date: Fri, 6 Dec 2019 15:40:02 +0100 Subject: [PATCH] fix: owner groups (GitLab) --- pkg/commands/pull_request.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/commands/pull_request.go b/pkg/commands/pull_request.go index d4eb36c08..da9775d08 100644 --- a/pkg/commands/pull_request.go +++ b/pkg/commands/pull_request.go @@ -111,7 +111,7 @@ func getRepoInfoFromURL(url string) *RepoInformation { if isHTTP { splits := strings.Split(url, "/") - owner := splits[len(splits)-2] + owner := strings.Join(splits[3:len(splits)-1], "/") repo := strings.TrimSuffix(splits[len(splits)-1], ".git") return &RepoInformation{ @@ -122,8 +122,8 @@ func getRepoInfoFromURL(url string) *RepoInformation { tmpSplit := strings.Split(url, ":") splits := strings.Split(tmpSplit[1], "/") - owner := splits[0] - repo := strings.TrimSuffix(splits[1], ".git") + owner := strings.Join(splits[0:len(splits)-1], "/") + repo := strings.TrimSuffix(splits[len(splits)-1], ".git") return &RepoInformation{ Owner: owner,