@@ -63,36 +63,18 @@ jobs:
6363
6464 # default to false
6565 $update = $false
66- $downloadPreview = $false
66+
67+ # compute authorization header in format "AUTHORIZATION: basic 'encoded token'"
68+ # 'encoded token' is the Base64 of the string "nfbot:personal-token"
69+ $auth = "basic $([System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes("nfbot:$(GitHubToken)")))"
6770
6871 if($env:System_PullRequest_PullRequestNumber -ne $null)
6972 {
7073 # PR build
71- # compute authorization header in format "AUTHORIZATION: basic 'encoded token'"
72- # 'encoded token' is the Base64 of the string "nfbot:personal-token"
73- $auth = "basic $([System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes("nfbot:$(GitHubToken)")))"
7474
7575 # find PR
7676 "Getting PR #$env:System_PullRequest_PullRequestNumber details..." | Write-Host -ForegroundColor White -NoNewline
7777 $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
78-
79- if($($pr.number) -eq "$env:System_PullRequest_PullRequestNumber")
80- {
81- 'OK' | Write-Host -ForegroundColor Green
82- }
83-
84- # grab PR commit message
85- $prCommitMessage = $($pr.body)
86-
87- # debug output
88- # echo "=====`r`n$($prCommitMessage)`r`n====="
89-
90- # check if should download nanoCLR to run unit tests
91- if($prCommitMessage -match "\[tested against nanoclr buildId (\d+)\]")
92- {
93- Write-Host "##[command] **Download preview nanoCLR for unit tests**"
94- $downloadPreview = $true
95- }
9678 }
9779 else
9880 {
@@ -131,7 +113,6 @@ jobs:
131113
132114 # set variables to forward to jobs
133115 echo "##vso[task.setvariable variable=RUN_UPDATE_DEPENDENTS;isOutput=true]$update"
134- echo "##vso[task.setvariable variable=DOWNLOAD_PREVIEW_NANOCLR;isOutput=true]$downloadPreview"
135116 name: GetPRLabels
136117 displayName: Check build conditions
137118
@@ -160,8 +141,6 @@ jobs:
160141 value : ' nanoFramework.Tools.MetadataProcessor.sln'
161142 - name : NF_MDP_MSBUILDTASK_PATH
162143 value : ' $(System.DefaultWorkingDirectory)/MetadataProcessor.MsBuildTask/bin/Release/net472'
163- - name : DownloadNanoClrPreview
164- value : $[ dependencies.Build_Prep.outputs['GetPRLabels.DOWNLOAD_PREVIEW_NANOCLR'] ]
165144
166145 steps :
167146
0 commit comments