Skip to content

Commit bbb7ab0

Browse files
authored
Update ReportDiff to add a Content-Type header (#54307)
1 parent 6e537f4 commit bbb7ab0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/ReportDiff.ps1

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@
22
$changed = (select-string "nothing to commit" artifacts\status.txt).count -eq 0
33
if (-not $changed) { return $changed }
44
# Check if tracking issue is open/closed
5-
$Headers = @{ Authorization = 'token {0}' -f $ENV:GITHUB_TOKEN; };
5+
$Headers = @{
6+
Authorization = 'token {0}' -f $ENV:GITHUB_TOKEN;
7+
'Content-Type' = 'application/json'
8+
};
69
$result = Invoke-RestMethod -Uri $issue
7-
if ($result.state -eq "closed") {
10+
if ($result.state -eq "closed") {
811
$json = "{ `"state`": `"open`" }"
912
$result = Invoke-RestMethod -Method PATCH -Headers $Headers -Uri $issue -Body $json
1013
}

0 commit comments

Comments
 (0)