|
|
@@ -26,4 +26,29 @@ $diff
|
|
|
$json = ConvertTo-Json -InputObject @{ 'body' = $body }
|
|
|
$issue = $issue + '/comments'
|
|
|
$result = Invoke-RestMethod -Method POST -Headers $Headers -Uri $issue -Body $json
|
|
|
-return $changed
|
|
|
+
|
|
|
+# Check if there's an open PR in AspNetCore or Runtime to resolve this difference.
|
|
|
+$sendpr = $true
|
|
|
+$Headers = @{ Accept = 'application/vnd.github.v3+json' };
|
|
|
+
|
|
|
+$prsLink = "https://api.github.com/repos/dotnet/aspnetcore/pulls?state=open"
|
|
|
+$result = Invoke-RestMethod -Method GET -Headers $Headers -Uri $prsLink
|
|
|
+
|
|
|
+foreach ($pr in $result) {
|
|
|
+ if ($pr.body -And $pr.body.Contains("Fixes #18943")) {
|
|
|
+ $sendpr = $false
|
|
|
+ return $sendpr
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+$prsLink = "https://api.github.com/repos/dotnet/runtime/pulls?state=open"
|
|
|
+$result = Invoke-RestMethod -Method GET -Headers $Headers -Uri $prsLink
|
|
|
+
|
|
|
+foreach ($pr in $result) {
|
|
|
+ if ($pr.body -And $pr.body.Contains("Fixes https://github.com/dotnet/aspnetcore/issues/18943")) {
|
|
|
+ $sendpr = $false
|
|
|
+ return $sendpr
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+return $sendpr
|