github_branches only checks the first 100 results returned from GitHub API when querying for branches. If the user's target branch is not in the first 100 results, the function misses out on retrieving an existing branch. As a result, github_files returns no files.
Expected behaviour
Search through all API results in batches (100 at a time, max limit per query) until either the target branch is found, or until end of query is reached in github_branches -> Find appropriate branch -> Fetch appropriate files
1. Bug description
github_branches
only checks the first 100 results returned from GitHub API when querying for branches. If the user's target branch is not in the first 100 results, the function misses out on retrieving an existing branch. As a result,github_files
returns no files.Expected behaviour
Search through all API results in batches (100 at a time, max limit per query) until either the target branch is found, or until end of query is reached in
github_branches
-> Find appropriate branch -> Fetch appropriate files2. Reproducible example
Code
master branch does exist!! ^^
Console output
Data
--
3. Session info
(Add output of the R function
utils::sessionInfo()
below. This helps us assess version/OS conflicts which could be causing bugs.)Not relevant