Skip to content

Commit 2773b7e

Browse files
committed
Paging was simply wrong, it only followed by 1 page
1 parent 6cc9f65 commit 2773b7e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

GitHubAnalytics.psm1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,11 +1052,11 @@ function Get-NextResultPage
10521052
return $null
10531053
}
10541054

1055-
$nextLinkString = $jsonResult.Headers.Link.Split(',')[0]
1055+
$nextLinkString = $jsonResult.Headers.Link.Split(',').Where{ $_ -match 'rel="next"' }
10561056

10571057
# Get url query for the next page
10581058
$query = $nextLinkString.Split(';')[0].replace('<','').replace('>','')
1059-
if ($query -notmatch '&page=1')
1059+
if ($query -notmatch '&page=1>')
10601060
{
10611061
return $query
10621062
}
@@ -1197,4 +1197,4 @@ function Get-WeekDate
11971197
}
11981198

11991199
return $beginningsOfWeeks
1200-
}
1200+
}

0 commit comments

Comments
 (0)