mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-02-15 00:54:51 +01:00
Makes dump_commits_since.ps1 work on PowerShell 5.1 (#7680)
This commit is contained in:
@@ -13,9 +13,12 @@ param(
|
||||
|
||||
$r = @()
|
||||
|
||||
$page = 1
|
||||
|
||||
$qParams = @{
|
||||
"since" = $since.ToString("o");
|
||||
"per_page" = 100
|
||||
"page" = $page
|
||||
}
|
||||
|
||||
if ($until -ne $null) {
|
||||
@@ -24,11 +27,19 @@ if ($until -ne $null) {
|
||||
|
||||
$url = "https://api.github.com/repos/{0}/commits" -f $repo
|
||||
|
||||
|
||||
|
||||
while ($null -ne $url)
|
||||
{
|
||||
$resp = Invoke-WebRequest $url -Body $qParams
|
||||
$resp = Invoke-WebRequest $url -UseBasicParsing -Body $qParams
|
||||
|
||||
$url = $resp.RelationLink.next
|
||||
if($resp.Content.Length -eq 2) {
|
||||
break
|
||||
}
|
||||
|
||||
$page += 1
|
||||
$qParams["page"] = $page
|
||||
|
||||
|
||||
$j = ConvertFrom-Json $resp.Content
|
||||
$r += $j
|
||||
|
||||
Reference in New Issue
Block a user