From e762290e237f1e62916e17a901d1f819960d3378 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Sun, 5 Dec 2021 11:05:38 +0100 Subject: gitlab: order events on the fly --- bridge/gitlab/import.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'bridge/gitlab/import.go') diff --git a/bridge/gitlab/import.go b/bridge/gitlab/import.go index bf28ee4c..98322528 100644 --- a/bridge/gitlab/import.go +++ b/bridge/gitlab/import.go @@ -71,7 +71,13 @@ func (gi *gitlabImporter) ImportAll(ctx context.Context, repo *cache.RepoCache, return } - for _, e := range SortedEvents(IssueEvents(ctx, gi.client, issue)) { + issueEvents := SortedEvents( + Notes(ctx, gi.client, issue), + LabelEvents(ctx, gi.client, issue), + StateEvents(ctx, gi.client, issue), + ) + + for e := range issueEvents { if e, ok := e.(ErrorEvent); ok { out <- core.NewImportError(e.Err, "") continue -- cgit