r-lib / gh

Minimalistic GitHub API client in R
https://gh.r-lib.org
Other
223 stars 52 forks source link

Infinite recursion while paging? #147

Closed jeroen closed 3 years ago

jeroen commented 3 years ago

When we automatically traverse pages, gh seems to run into some infinite loop and finding many more results than expected

# Find the number of repos for user 'rforge'
user <- gh::gh('/users/rforge')
print(user$public_repos) #2132

# Actually list these repos:
repos <- gh::gh('/users/rforge/repos', per_page = 100, .limit = 1e5)

This is gh_1.2.0.

jeroen commented 3 years ago

Actually maybe it's just the progress bar that is very off.

gaborcsardi commented 3 years ago

OK, that's better and makes sense. Thanks!

gaborcsardi commented 3 years ago
# Find the number of repos for user 'rforge'
user <- gh::gh('/users/r-forge')
print(user$public_repos) #2132

# Actually list these repos:
repos <- gh::gh('/users/r-forge/repos', per_page = 100, .limit = 1e5)
jeroen commented 3 years ago

Thanks!