diff options
author | William Wagner Moraes Artero <williamwmoraes@gmail.com> | 2019-12-06 15:40:02 +0100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-03-01 10:57:12 +1100 |
commit | 0eb3090ad6200f59e7164d9ca6d5e9b597162569 (patch) | |
tree | 29eda65a75520b790ce0efd305b7abadda7d38c8 /pkg/commands | |
parent | 6ea25bd259f1252dce2011cc93501e75b9398cb6 (diff) |
fix: owner groups (GitLab)
Diffstat (limited to 'pkg/commands')
-rw-r--r-- | pkg/commands/pull_request.go | 6 |
1 files 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, |