Skip to content

Commit c83383b

Browse files
committed
Work CI-CD
- Migrate call to Invoke-RestMethod and pass auth in header. - Fix header parameter in Invoke-RestMethod call. ***NO_CI***
1 parent 38b4bfe commit c83383b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

azure-pipelines.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
7575
# find PR
7676
"Getting PR #$env:System_PullRequest_PullRequestNumber details..." | Write-Host -ForegroundColor White -NoNewline
77-
$pr = Invoke-WebRequest "https://api.github.com/repos/$env:Build_Repository_Name/pulls/$env:System_PullRequest_PullRequestNumber" | ConvertFrom-Json
77+
$pr = Invoke-RestMethod -Uri "https://api.github.com/repos/$env:Build_Repository_Name/pulls/$env:System_PullRequest_PullRequestNumber" -Header @{"Authorization"="$auth"} -ContentType "application/json" -Method GET
7878
7979
if($($pr.number) -eq "$env:System_PullRequest_PullRequestNumber")
8080
{
@@ -103,7 +103,7 @@ jobs:
103103
104104
# get PR associate with commit
105105
$prUrl = "https://api.github.com/repos/nanoframework/metadata-processor/commits/$commitId/pulls"
106-
$commit = Invoke-RestMethod -Uri $prUrl -ContentType "application/json" -Headers @{"Accept"="application/vnd.github.groot-preview+json"} -Method GET
106+
$commit = Invoke-RestMethod -Uri $prUrl -ContentType "application/json" -Header @{"Authorization"="$auth"} -Method GET
107107
108108
if($commit -ne $null)
109109
{

0 commit comments

Comments
 (0)