|
@@ -2,9 +2,12 @@
|
|
|
$changed = (select-string "nothing to commit" artifacts\status.txt).count -eq 0
|
|
$changed = (select-string "nothing to commit" artifacts\status.txt).count -eq 0
|
|
|
if (-not $changed) { return $changed }
|
|
if (-not $changed) { return $changed }
|
|
|
# Check if tracking issue is open/closed
|
|
# Check if tracking issue is open/closed
|
|
|
-$Headers = @{ Authorization = 'token {0}' -f $ENV:GITHUB_TOKEN; };
|
|
|
|
|
|
|
+$Headers = @{
|
|
|
|
|
+ Authorization = 'token {0}' -f $ENV:GITHUB_TOKEN;
|
|
|
|
|
+ 'Content-Type' = 'application/json'
|
|
|
|
|
+};
|
|
|
$result = Invoke-RestMethod -Uri $issue
|
|
$result = Invoke-RestMethod -Uri $issue
|
|
|
-if ($result.state -eq "closed") {
|
|
|
|
|
|
|
+if ($result.state -eq "closed") {
|
|
|
$json = "{ `"state`": `"open`" }"
|
|
$json = "{ `"state`": `"open`" }"
|
|
|
$result = Invoke-RestMethod -Method PATCH -Headers $Headers -Uri $issue -Body $json
|
|
$result = Invoke-RestMethod -Method PATCH -Headers $Headers -Uri $issue -Body $json
|
|
|
}
|
|
}
|