diff options
author | Michael Muré <batolettre@gmail.com> | 2020-02-23 14:05:03 +0100 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2020-02-23 14:20:54 +0100 |
commit | 0cebe1e57e7e4b03aef77cd11bd4fc683c32afc6 (patch) | |
tree | 6c488eef7d39ffcf9226cb1952460b44920ed39e /bridge/github/import.go | |
parent | b3318335986618388637a9d35d68b39633e4548a (diff) | |
download | git-bug-0cebe1e57e7e4b03aef77cd11bd4fc683c32afc6.tar.gz |
bridge: record the login used during the configure and use it as default credential
fix #338
Diffstat (limited to 'bridge/github/import.go')
-rw-r--r-- | bridge/github/import.go | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/bridge/github/import.go b/bridge/github/import.go index b30be73a..58fec98c 100644 --- a/bridge/github/import.go +++ b/bridge/github/import.go @@ -19,7 +19,7 @@ import ( type githubImporter struct { conf core.Configuration - // default user client + // default client client *githubv4.Client // iterator @@ -32,7 +32,11 @@ type githubImporter struct { func (gi *githubImporter) Init(_ context.Context, repo *cache.RepoCache, conf core.Configuration) error { gi.conf = conf - creds, err := auth.List(repo, auth.WithTarget(target), auth.WithKind(auth.KindToken)) + creds, err := auth.List(repo, + auth.WithTarget(target), + auth.WithKind(auth.KindToken), + auth.WithMeta(auth.MetaKeyLogin, conf[confKeyDefaultLogin]), + ) if err != nil { return err } @@ -434,7 +438,7 @@ func (gi *githubImporter) ensureTimelineComment(repo *cache.RepoCache, b *cache. } gi.out <- core.NewImportComment(op.Id()) - // set target for the nexr edit now that the comment is created + // set target for the next edit now that the comment is created targetOpID = op.Id() continue } |