From b8976762fe93a4b22b924e29a2f414c6911bb5de Mon Sep 17 00:00:00 2001 From: Peng Jiahui <804873052@qq.com> Date: Mon, 5 Feb 2024 10:41:52 +0800 Subject: [PATCH 1/3] Add ContentType header to Update-GitHubIssue --- eng/common/scripts/Invoke-GitHubAPI.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/eng/common/scripts/Invoke-GitHubAPI.ps1 b/eng/common/scripts/Invoke-GitHubAPI.ps1 index 6b96f0920f4..f59741d03c3 100644 --- a/eng/common/scripts/Invoke-GitHubAPI.ps1 +++ b/eng/common/scripts/Invoke-GitHubAPI.ps1 @@ -403,6 +403,7 @@ function Update-GitHubIssue { -Uri $uri ` -Headers (Get-GitHubApiHeaders -token $AuthToken) ` -MaximumRetryCount 3 + -ContentType "application/x-www-form-urlencoded" } function Remove-GitHubSourceReferences { From 65ee4fa6dedf46246b5417f994385eb564e01121 Mon Sep 17 00:00:00 2001 From: Peng Jiahui <804873052@qq.com> Date: Mon, 5 Feb 2024 15:04:06 +0800 Subject: [PATCH 2/3] replaced application/json --- eng/common/scripts/Invoke-GitHubAPI.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/common/scripts/Invoke-GitHubAPI.ps1 b/eng/common/scripts/Invoke-GitHubAPI.ps1 index f59741d03c3..afd54e41d25 100644 --- a/eng/common/scripts/Invoke-GitHubAPI.ps1 +++ b/eng/common/scripts/Invoke-GitHubAPI.ps1 @@ -403,7 +403,7 @@ function Update-GitHubIssue { -Uri $uri ` -Headers (Get-GitHubApiHeaders -token $AuthToken) ` -MaximumRetryCount 3 - -ContentType "application/x-www-form-urlencoded" + -ContentType "application/json" } function Remove-GitHubSourceReferences { From 9fb334438e8eca49602aaedb2c8f12cc2ec53208 Mon Sep 17 00:00:00 2001 From: Wes Haggard Date: Mon, 5 Feb 2024 16:51:24 -0800 Subject: [PATCH 3/3] Update eng/common/scripts/Invoke-GitHubAPI.ps1 Co-authored-by: Daniel Jurek --- eng/common/scripts/Invoke-GitHubAPI.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/common/scripts/Invoke-GitHubAPI.ps1 b/eng/common/scripts/Invoke-GitHubAPI.ps1 index afd54e41d25..c4a9fa5bb11 100644 --- a/eng/common/scripts/Invoke-GitHubAPI.ps1 +++ b/eng/common/scripts/Invoke-GitHubAPI.ps1 @@ -402,7 +402,7 @@ function Update-GitHubIssue { -Body ($parameters | ConvertTo-Json) ` -Uri $uri ` -Headers (Get-GitHubApiHeaders -token $AuthToken) ` - -MaximumRetryCount 3 + -MaximumRetryCount 3 ` -ContentType "application/json" }