From d098a96407c55281c28bfdea9925df587b4d4400 Mon Sep 17 00:00:00 2001 From: Amine Date: Tue, 23 Jul 2019 17:10:07 +0200 Subject: bridge/gitlab: global code and comment updates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Michael Muré --- bridge/gitlab/config.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'bridge/gitlab/config.go') diff --git a/bridge/gitlab/config.go b/bridge/gitlab/config.go index a375bab2..dbbd1bd9 100644 --- a/bridge/gitlab/config.go +++ b/bridge/gitlab/config.go @@ -62,13 +62,13 @@ func (*Gitlab) Configure(repo repository.RepoCommon, params core.BridgeParams) ( } var ok bool - // validate project url and get it ID + // validate project url and get its ID ok, id, err := validateProjectURL(url, token) if err != nil { return nil, errors.Wrap(err, "project validation") } if !ok { - return nil, fmt.Errorf("invalid project id or wrong token scope") + return nil, fmt.Errorf("invalid project id or incorrect token scope") } conf[keyProjectID] = strconv.Itoa(id) @@ -121,7 +121,7 @@ func promptToken() (string, error) { return token, nil } - fmt.Println("token is invalid") + fmt.Println("token format is invalid") } } @@ -147,7 +147,7 @@ func promptURL(remotes map[string]string) (string, error) { line = strings.TrimRight(line, "\n") index, err := strconv.Atoi(line) - if err != nil || (index < 0 && index >= len(validRemotes)) { + if err != nil || (index < 0 && index > len(validRemotes)) { fmt.Println("invalid input") continue } -- cgit