github-api
github-api copied to clipboard
PagedSearchIterable relies on cached result
The populate() method depends on adapt(). The Iterator created in adapt() loads a result, but never refreshes it:
https://github.com/github-api/github-api/blob/bccae94c7a740fa7ba297fd6eb2a6782ed156a98/src/main/java/org/kohsuke/github/PagedSearchIterable.java#L91-L93
This means that the getTotalCount() can become out of sync from iterators or actual search results.
https://github.com/github-api/github-api/blob/bccae94c7a740fa7ba297fd6eb2a6782ed156a98/src/main/java/org/kohsuke/github/PagedSearchIterable.java#L48-L50