aboutsummaryrefslogtreecommitdiffstats
path: root/bridge/gitlab/iterator/labelEvent.go
diff options
context:
space:
mode:
Diffstat (limited to 'bridge/gitlab/iterator/labelEvent.go')
-rw-r--r--bridge/gitlab/iterator/labelEvent.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/bridge/gitlab/iterator/labelEvent.go b/bridge/gitlab/iterator/labelEvent.go
index 7ee2604b..812e6646 100644
--- a/bridge/gitlab/iterator/labelEvent.go
+++ b/bridge/gitlab/iterator/labelEvent.go
@@ -49,7 +49,7 @@ func (lei *labelEventIterator) getNext(ctx context.Context, conf config) (bool,
// and sort them by ID
page := 1
for {
- labelEvents, _, err := conf.gc.ResourceLabelEvents.ListIssueLabelEvents(
+ labelEvents, resp, err := conf.gc.ResourceLabelEvents.ListIssueLabelEvents(
conf.project,
lei.issue,
&gitlab.ListLabelEventsOptions{
@@ -68,7 +68,13 @@ func (lei *labelEventIterator) getNext(ctx context.Context, conf config) (bool,
if len(labelEvents) == 0 {
break
}
+
lei.cache = append(lei.cache, labelEvents...)
+
+ if resp.TotalPages == page {
+ break
+ }
+
page++
}