Client: Document that Issues::all() does not in fact return all issues due to pagination

The GitLab API normally limits the list of issues to 100 entries per request, with a default of 20. This means that Issues::all() and Project::issues() by extension only return the first 20 issues of a project by default, which is surprising given their respective names. It’d be nice if the docs stated this fact, and provided a workaround.

I’d be willing to write a PR for this.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 17 (4 by maintainers)

Commits related to this issue

Most upvoted comments

@mzeis @fr0z3nfyr I accidentally had this issue again while writing another script. I had the exact same issue as you @mzeis that it worked fine on one system but not on the other. The strange this is they are both running the same version of PHP 7.2.24-0ubuntu0.18.04.3! I got some more details this time, I think something is really borked with the pagination. Adding the parameter per_page 20 gave a result of 40 projects, per_page=25 gave 50. So the pagination only doubles the amount of results!

@mzeis Can’t remember exactly, but I think I do longer use the script which needed to fetch all projects. But I’m also having trouble with pagination with other api calls like fetching jobs etc.