Pipeline.pipelines_by_branch() should use api.collect_all_pages()
Created by: mrj10
pipelines_by_branch()
uses api.call()
, which implicitly only returns the first page of GitLab API objects/resources (20 by default).
If a branch has more than 1 page worth of pipelines, `pipelines_by_branch() will return a subset, and if the SHA you're looking for isn't in the first page, you'll spin forever for a pipeline that is already there (just on a subsequent page).
I think calling api.collect_all_pages()
instead of api.call()
will fix it.
Probably worth scrubbing the rest of the codebase to use collect_all_pages()
whenever pagination might be in play.