[Bug]Fix pagination when ApiOptions.StartPage is explicitly set.

This commit is contained in:
Pavel Kindruk
2023-09-22 17:09:37 +03:00
committed by GitHub
parent dcc31b8e0c
commit 57a29e90d0
2 changed files with 66 additions and 1 deletions

View File

@@ -76,7 +76,14 @@ namespace Octokit
foreach (var existing in existingParameters)
{
if (!p.ContainsKey(existing.Key))
if (existing.Key == "page")
{
// See https://github.com/octokit/octokit.net/issues/1955
// See https://github.com/octokit/octokit.net/issues/2602
// Desired behavior: don't replace page number in nextPageUri
p[existing.Key] = existing.Value;
}
else if (!p.ContainsKey(existing.Key))
{
p.Add(existing);
}