From 066a10d7ab4497774f0f42f094a7e740d2a825fc 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 6b96f0920f..f59741d03c 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 c53646a27a3b99c2be68dad8d869301eced0fb58 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 f59741d03c..afd54e41d2 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 cb3a1ddd50dde996699287caadb071635cbeaa04 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 afd54e41d2..c4a9fa5bb1 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" }