Closed BjartN closed 4 years ago
Do you have a repository on which I can reproduce this?
I don't at the moment. This piece of code seems to be iterating over "numPages" without ever using the value of it. I'm assuming this is the problem.
Hacking it by adding "queryParamValues["page"] = numPages;" in the while loop would perhaps fix it.
`
private async Task<IEnumerable
while (!isLastPage && (maxPages == null || numPages < maxPages))
{
var selectorResults = await selector(queryParamValues).ConfigureAwait(false);
results.AddRange(selectorResults.Values);
isLastPage = selectorResults.Next == null;
numPages++;
}
return results;
}
`
Found it! :-) It was actually a little bit more involved than that, have a look at GetPagedResultsAsync(). The devil is in the Math.Max details. Thanks for reporting this issue!
The call await client.GetRepositoryCommitsAsync(workspace, repoSlug, 20) gives the same page 20 times. (I am using the version 1.0.0 Nuget package)