gridsuite / broadcast-event

Apache License 2.0
0 stars 1 forks source link

Paging #3

Open jonenst opened 4 years ago

jonenst commented 4 years ago

By default, api results are paged with a default page of 30. We could at least use per_page=100 (max allowed). And we should page through the whole result set https://docs.github.com/en/rest/guides/traversing-with-pagination

jonenst commented 4 years ago

You can use the "google" org for testing, it has almost 2k repos as of this date..

jonenst commented 4 years ago

'https://api.github.com/users/google/repos?per_page=100&page=11' works 'https://api.github.com/search/repositories?q=user:google&per_page=100&page=11' fails:

{
  "message": "Only the first 1000 search results are available",
  "documentation_url": "https://docs.github.com/v3/search/"
}
geofjamg commented 3 years ago

Solved by #4

jonenst commented 3 years ago

Using per_page=100 is a short term workaround, let's keep this open until the real fix is done

jonenst commented 2 years ago

also the search api seems to not return forked repos:

$ comm -3 <(curl 'https://api.github.com/search/repositories?q=user:gridsuite&per_page=100' | jq -r '.items[].name'  | sort) <(curl 'https://api.github.com/orgs/gridsuite/repos?per_page=100' | jq -r '.[].name'  | sort)

    broadcast-event
    oidc-mock-server

Both are forks:

 gridsuite / oidc-mock-server Public forked from appvia/mock-oidc-user-server 
 gridsuite / broadcast-event Public forked from geofjamg/broadcast-event