gitlab: Use all=True in most list() calls (#4491)

If `all=True` is not set then by default only 20 records will be
returned when calling `list()`. Use `all=True` so that all records
will be returned.

For the `list()` use where do not desire to retrieve all entries then
use`all=False` to show explicityly that we don't want to get all of
the entries.

Fixes: #3729
Fixes: #4460
This commit is contained in:
John Villalovos 2022-04-13 04:32:25 -07:00 committed by GitHub
parent e4a25beedc
commit fe4bbc5de3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 33 additions and 10 deletions

View file

@ -268,7 +268,7 @@ class GitLabHook(object):
@param hook_url Url to call on event
'''
def find_hook(self, project, hook_url):
hooks = project.hooks.list()
hooks = project.hooks.list(all=True)
for hook in hooks:
if (hook.url == hook_url):
return hook