What happened?
I tried requesting 5 pages of file changes in a PR, for example:
var apiOptions = new ApiOptions
{
PageCount = 5,
};
var pullRequest = await GitHubClient.PullRequest.Get(repoOwnerName, repositoryName, pullRequestNumber);
which actually requests all pages.
This is because of this code in Pagination.cs
return uri.Query.Split('&')
.Select(keyValue =>
{
var indexOf = keyValue.IndexOf('=');
if (indexOf > 0)
{
var key = keyValue.Substring(0, indexOf);
var value = keyValue.Substring(indexOf + 1);
return new KeyValuePair<string, string>(key, value);
}
//just a plain old value, return it
return new KeyValuePair<string, string>(keyValue, null);
})
.ToDictionary(x => x.Key, x => x.Value);
which incorrectly includes the initial ?, which you can see the effect of in this debugger screenshot

and TryGetValue naturally returns false.
Versions
Octokit.net 5.0.2
Relevant log output
No response
Code of Conduct
What happened?
I tried requesting 5 pages of file changes in a PR, for example:
which actually requests all pages.
This is because of this code in
Pagination.cswhich incorrectly includes the initial

?, which you can see the effect of in this debugger screenshotand
TryGetValuenaturally returns false.Versions
Octokit.net 5.0.2
Relevant log output
No response
Code of Conduct