aboutsummaryrefslogtreecommitdiffstats
path: root/bridge/gitlab
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2020-03-28 20:10:52 +0100
committerMichael Muré <batolettre@gmail.com>2020-03-28 20:10:52 +0100
commit38b42bc867f8f352908ba81334bec86b001e8fac (patch)
treef320e022395008b4f0dd0744a1be18f88fc8505b /bridge/gitlab
parentfec9ea09f65e5d15f365dd635885a709712be812 (diff)
downloadgit-bug-38b42bc867f8f352908ba81334bec86b001e8fac.tar.gz
jira/gitlab: fix a bad login handling in the configurator
Diffstat (limited to 'bridge/gitlab')
-rw-r--r--bridge/gitlab/config.go12
1 files changed, 7 insertions, 5 deletions
diff --git a/bridge/gitlab/config.go b/bridge/gitlab/config.go
index 8d2490b8..e4e3d8e3 100644
--- a/bridge/gitlab/config.go
+++ b/bridge/gitlab/config.go
@@ -88,13 +88,15 @@ func (g *Gitlab) Configure(repo *cache.RepoCache, params core.BridgeParams) (cor
token.SetMetadata(auth.MetaKeyBaseURL, baseUrl)
cred = token
default:
- login := params.Login
- if login == "" {
+ if params.Login == "" {
// TODO: validate username
login, err = input.Prompt("Gitlab login", "login", input.Required)
- if err != nil {
- return nil, err
- }
+ } else {
+ // TODO: validate username
+ login = params.Login
+ }
+ if err != nil {
+ return nil, err
}
cred, err = promptTokenOptions(repo, login, baseUrl)
if err != nil {