From ae2f942ef907161af0aba5f3511db72cf9801dca Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Sun, 12 Jan 2020 16:38:16 +0100 Subject: more wip --- bridge/github/config.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'bridge/github/config.go') diff --git a/bridge/github/config.go b/bridge/github/config.go index e51f244b..fcb94079 100644 --- a/bridge/github/config.go +++ b/bridge/github/config.go @@ -81,7 +81,7 @@ func (g *Github) Configure(repo *cache.RepoCache, params core.BridgeParams) (cor login := params.Login if login == "" { - login, err = input.Prompt("Github login", "", true, validateUsername) + login, err = input.Prompt("Github login", "login", input.Required, validateUsername) if err != nil { return nil, err } @@ -128,6 +128,10 @@ func (g *Github) Configure(repo *cache.RepoCache, params core.BridgeParams) (cor return nil, err } + // Todo: if no user exist with the given login + // - tag the default user with the github login + // - add a command to manually tag a user ? + // don't forget to store the now known valid token if !auth.IdExist(repo, cred.ID()) { err = auth.Store(repo, cred) @@ -317,7 +321,7 @@ func promptToken() (string, error) { return "token has incorrect format", nil } - return input.Prompt("Enter token", "token", "", input.Required, validator) + return input.Prompt("Enter token", "token", input.Required, validator) } func loginAndRequestToken(login, owner, project string) (string, error) { -- cgit