diff options
author | Michael Muré <batolettre@gmail.com> | 2020-02-15 13:54:51 +0100 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2020-02-15 13:54:51 +0100 |
commit | cfa005889a7d398ee71eac4a6d4b23a691a7ef2a (patch) | |
tree | 15d115fa77e61194b39ff0e7745778de8924070f /bridge/gitlab/config.go | |
parent | 432a816dde18a12c1479ed8151a11c29929476e0 (diff) | |
parent | 02548c0e8f96a5c08efe46bd5f71f97fdd211de3 (diff) | |
download | git-bug-cfa005889a7d398ee71eac4a6d4b23a691a7ef2a.tar.gz |
Merge remote-tracking branch 'origin/master' into cheshirekow-jira
Diffstat (limited to 'bridge/gitlab/config.go')
-rw-r--r-- | bridge/gitlab/config.go | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/bridge/gitlab/config.go b/bridge/gitlab/config.go index 94026635..b730a365 100644 --- a/bridge/gitlab/config.go +++ b/bridge/gitlab/config.go @@ -161,14 +161,18 @@ func promptTokenOptions(repo repository.RepoConfig, login, baseUrl string) (auth return nil, err } - cred, err := input.PromptCredential(target, "token", creds) - switch err { - case nil: + cred, index, err := input.PromptCredential(target, "token", creds, []string{ + "enter my token", + }) + switch { + case err != nil: + return nil, err + case cred != nil: return cred, nil - case input.ErrDirectPrompt: + case index == 0: return promptToken(baseUrl) default: - return nil, err + panic("missed case") } } |