aboutsummaryrefslogtreecommitdiffstats
path: root/bridge/gitlab/import.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2020-02-04 00:25:27 +0100
committerMichael Muré <batolettre@gmail.com>2020-02-08 17:19:57 +0100
commitf515b9a1291ddd3e4fe1b43bf5891ab19569e33f (patch)
tree05f043ba5d2279f547d6dbc8e2f938c240f9b04d /bridge/gitlab/import.go
parent74e91144105790cc997c1d79a7f638e1e3a1f3f8 (diff)
downloadgit-bug-f515b9a1291ddd3e4fe1b43bf5891ab19569e33f.tar.gz
gitlab also compile
Diffstat (limited to 'bridge/gitlab/import.go')
-rw-r--r--bridge/gitlab/import.go17
1 files changed, 1 insertions, 16 deletions
diff --git a/bridge/gitlab/import.go b/bridge/gitlab/import.go
index fa6bbfb6..d699554b 100644
--- a/bridge/gitlab/import.go
+++ b/bridge/gitlab/import.go
@@ -13,7 +13,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"
)
@@ -34,20 +33,7 @@ type gitlabImporter struct {
func (gi *gitlabImporter) 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
}
@@ -403,7 +389,6 @@ func (gi *gitlabImporter) ensurePerson(repo *cache.RepoCache, id int) (*cache.Id
i, err = repo.NewIdentityRaw(
user.Name,
user.PublicEmail,
- user.Username,
user.AvatarURL,
map[string]string{
// because Gitlab