Skip to content

Commit b9de042

Browse files
authored
Add Content-Type to the GH PR api call (#8275)
We were hitting an error caused by some recent GH changes. Based on https://github.com/orgs/community/discussions/110246 you now need to explicitly set Content-Type in the headers to avoid the error: The given key 'Content-Type' was not present in the dictionary.
1 parent f305fc0 commit b9de042

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

eng/scripts/Verify-And-Merge-PRs.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ param(
88

99
$ReadyForMerge = $true
1010
$mergablePRs = @()
11-
$headers = @{ }
11+
$headers = @{ "Content-Type" = "text/json" }
1212
$RetryCount = 5
1313

1414
if ($null -eq $ShouldMerge) {
1515
$ShouldMerge = $null -ne $AuthToken;
1616
}
1717

1818
if ($AuthToken) {
19-
$headers = @{
19+
$headers += @{
2020
Authorization = "bearer $AuthToken"
2121
}
2222
}

0 commit comments

Comments
 (0)