From f50aea486bdb873d12b900dc767940c6bf34d7b8 Mon Sep 17 00:00:00 2001 From: Remi Rampin Date: Fri, 8 Oct 2021 22:22:24 -0400 Subject: Fix GitLab showing https:/../personal_access_token Using path.Join() to concatenate URLs doesn't really make sense, and in particular will change "//" to "/". --- bridge/gitlab/config.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'bridge') diff --git a/bridge/gitlab/config.go b/bridge/gitlab/config.go index 3496b4a3..a8c3e673 100644 --- a/bridge/gitlab/config.go +++ b/bridge/gitlab/config.go @@ -3,7 +3,6 @@ package gitlab import ( "fmt" "net/url" - "path" "regexp" "strconv" "strings" @@ -195,7 +194,7 @@ func promptTokenOptions(repo repository.RepoKeyring, login, baseUrl string) (aut } func promptToken(baseUrl string) (*auth.Token, error) { - fmt.Printf("You can generate a new token by visiting %s.\n", path.Join(baseUrl, "profile/personal_access_tokens")) + fmt.Printf("You can generate a new token by visiting %s.\n", strings.TrimSuffix(baseUrl, "/")+"/profile/personal_access_tokens") fmt.Println("Choose 'Create personal access token' and set the necessary access scope for your repository.") fmt.Println() fmt.Println("'api' access scope: to be able to make api calls") -- cgit From 882579b129c5131c30dc2425b24d798f1227e86c Mon Sep 17 00:00:00 2001 From: Remi Rampin Date: Fri, 8 Oct 2021 22:25:05 -0400 Subject: Update URL of GitLab access token settings --- bridge/gitlab/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bridge') diff --git a/bridge/gitlab/config.go b/bridge/gitlab/config.go index a8c3e673..4a714d09 100644 --- a/bridge/gitlab/config.go +++ b/bridge/gitlab/config.go @@ -194,7 +194,7 @@ func promptTokenOptions(repo repository.RepoKeyring, login, baseUrl string) (aut } func promptToken(baseUrl string) (*auth.Token, error) { - fmt.Printf("You can generate a new token by visiting %s.\n", strings.TrimSuffix(baseUrl, "/")+"/profile/personal_access_tokens") + fmt.Printf("You can generate a new token by visiting %s.\n", strings.TrimSuffix(baseUrl, "/")+"/-/profile/personal_access_tokens") fmt.Println("Choose 'Create personal access token' and set the necessary access scope for your repository.") fmt.Println() fmt.Println("'api' access scope: to be able to make api calls") -- cgit