Skip to content

Commit

Permalink
Fix iterating all GitLab comments
Browse files Browse the repository at this point in the history
Fixes the following warning:

    reviewrot/gitlabstack.py:227: UserWarning: Calling a `list()` method
    without specifying `get_all=True` or `iterator=True` will return a
    maximum of 20 items.
  • Loading branch information
hluk committed Feb 16, 2023
1 parent ed8bc4d commit 42bbcd6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion reviewrot/gitlabstack.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def get_last_comment(self, mr):
last comment (LastComment): Returns namedtuple LastComment
with data related to last comment
"""
for note in mr.notes.list():
for note in mr.notes.list(iterator=True):
if not note.system:
return LastComment(
author=note.author["username"],
Expand Down

0 comments on commit 42bbcd6

Please sign in to comment.