aboutsummaryrefslogtreecommitdiffstats
path: root/bridge/gitlab/import.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2020-04-04 12:48:24 +0200
committerGitHub <noreply@github.com>2020-04-04 12:48:24 +0200
commit2d64b85db71a17ff3277bbbf7ac9d8e81f8e416c (patch)
tree58df795ebf4bc2f5517c2537135bef2bb2a77c10 /bridge/gitlab/import.go
parent38b42bc867f8f352908ba81334bec86b001e8fac (diff)
parent903549cadf40ede3771053781eb6e9fd31aaa64e (diff)
downloadgit-bug-2d64b85db71a17ff3277bbbf7ac9d8e81f8e416c.tar.gz
Merge pull request #363 from MichaelMure/gitlab-iterator0.7.1
gitlab: refactor the iterator, fix bug
Diffstat (limited to 'bridge/gitlab/import.go')
-rw-r--r--bridge/gitlab/import.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/bridge/gitlab/import.go b/bridge/gitlab/import.go
index 0a47a783..8aeab1ce 100644
--- a/bridge/gitlab/import.go
+++ b/bridge/gitlab/import.go
@@ -10,6 +10,7 @@ import (
"github.com/MichaelMure/git-bug/bridge/core"
"github.com/MichaelMure/git-bug/bridge/core/auth"
+ "github.com/MichaelMure/git-bug/bridge/gitlab/iterator"
"github.com/MichaelMure/git-bug/bug"
"github.com/MichaelMure/git-bug/cache"
"github.com/MichaelMure/git-bug/entity"
@@ -24,7 +25,7 @@ type gitlabImporter struct {
client *gitlab.Client
// iterator
- iterator *iterator
+ iterator *iterator.Iterator
// send only channel
out chan<- core.ImportResult
@@ -58,7 +59,7 @@ func (gi *gitlabImporter) Init(_ context.Context, repo *cache.RepoCache, conf co
// ImportAll iterate over all the configured repository issues (notes) and ensure the creation
// of the missing issues / comments / label events / title changes ...
func (gi *gitlabImporter) ImportAll(ctx context.Context, repo *cache.RepoCache, since time.Time) (<-chan core.ImportResult, error) {
- gi.iterator = NewIterator(ctx, gi.client, 10, gi.conf[confKeyProjectID], since)
+ gi.iterator = iterator.NewIterator(ctx, gi.client, 10, gi.conf[confKeyProjectID], since)
out := make(chan core.ImportResult)
gi.out = out