aboutsummaryrefslogtreecommitdiffstats
path: root/bridge/github/config.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2020-01-12 16:38:16 +0100
committerMichael Muré <batolettre@gmail.com>2020-02-08 17:18:28 +0100
commitae2f942ef907161af0aba5f3511db72cf9801dca (patch)
tree899e9a2d93d3d4be3b700f5763b7bc158c24ff30 /bridge/github/config.go
parent26f0152384f77d2bfd16c6762f5618bc966809a6 (diff)
downloadgit-bug-ae2f942ef907161af0aba5f3511db72cf9801dca.tar.gz
more wip
Diffstat (limited to 'bridge/github/config.go')
-rw-r--r--bridge/github/config.go8
1 files changed, 6 insertions, 2 deletions
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) {