diff options
author | Michael Muré <batolettre@gmail.com> | 2020-02-23 19:20:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-23 19:20:45 +0100 |
commit | 8ef6438fb476e9d510a39ead321cbeee6288e2d2 (patch) | |
tree | 2bcd2a5420bbdbed13b3de82992c30b7d17893e2 /bridge/github/import.go | |
parent | 0e68c10ffc3f9e72e32b8cdfcd917b3fe1ab240c (diff) | |
parent | 0cebe1e57e7e4b03aef77cd11bd4fc683c32afc6 (diff) | |
download | git-bug-8ef6438fb476e9d510a39ead321cbeee6288e2d2.tar.gz |
Merge pull request #341 from MichaelMure/bridges-default-login
bridge: record the login used during the configure and use it as default credential
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 e80b9cfd..7aec809f 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 } |