aboutsummaryrefslogtreecommitdiffstats
path: root/bridge/github/import.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/import.go
parent26f0152384f77d2bfd16c6762f5618bc966809a6 (diff)
downloadgit-bug-ae2f942ef907161af0aba5f3511db72cf9801dca.tar.gz
more wip
Diffstat (limited to 'bridge/github/import.go')
-rw-r--r--bridge/github/import.go16
1 files changed, 1 insertions, 15 deletions
diff --git a/bridge/github/import.go b/bridge/github/import.go
index 39aebccb..aac4f119 100644
--- a/bridge/github/import.go
+++ b/bridge/github/import.go
@@ -12,7 +12,6 @@ import (
"github.com/MichaelMure/git-bug/bug"
"github.com/MichaelMure/git-bug/cache"
"github.com/MichaelMure/git-bug/entity"
- "github.com/MichaelMure/git-bug/identity"
"github.com/MichaelMure/git-bug/util/text"
)
@@ -39,20 +38,7 @@ type githubImporter struct {
func (gi *githubImporter) Init(repo *cache.RepoCache, conf core.Configuration) error {
gi.conf = conf
- opts := []auth.Option{
- auth.WithTarget(target),
- auth.WithKind(auth.KindToken),
- }
-
- user, err := repo.GetUserIdentity()
- if err == nil {
- opts = append(opts, auth.WithUserId(user.Id()))
- }
- if err == identity.ErrNoIdentitySet {
- opts = append(opts, auth.WithUserId(auth.DefaultUserId))
- }
-
- creds, err := auth.List(repo, opts...)
+ creds, err := auth.List(repo, auth.WithTarget(target), auth.WithKind(auth.KindToken))
if err != nil {
return err
}