Skip to content

Commit 976f2f8

Browse files
committed
Work CI-CD
- Update VS extension now labels PR. - Rename var to allow reuse for GitHub CLI. ***NO_CI***
1 parent c1f66c3 commit 976f2f8

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

azure-pipelines.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,6 @@ steps:
220220
.\sign code azure-key-vault `
221221
"**/*.nupkg" `
222222
--base-directory "$(Build.ArtifactStagingDirectory)" `
223-
--file-list "$(Build.Repository.LocalPath)\config\filelist.txt" `
224223
--description ".NET nanoFramework Debugger" `
225224
--description-url "https://github.com/$env:Build_Repository_Name" `
226225
--azure-key-vault-tenant-id "$(SignTenantId)" `
@@ -330,7 +329,7 @@ steps:
330329
targetType: filePath
331330
filePath: azure-pipelines/update-dependents.ps1
332331
env:
333-
GH_TOKEN: $(GitHubToken)
332+
GITHUB_TOKEN: $(GitHubToken)
334333

335334
# step from template @ nf-tools repo
336335
# report error

azure-pipelines/update-dependents.ps1

+7-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
# compute authorization header in format "AUTHORIZATION: basic 'encoded token'"
77
# 'encoded token' is the Base64 of the string "nfbot:personal-token"
8-
$auth = "basic $([System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes("nfbot:$env:GH_TOKEN")))"
8+
$auth = "basic $([System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes("nfbot:$env:GITHUB_TOKEN")))"
99

1010
# because it can take sometime for the package to become available on the NuGet providers
1111
# need to hang here for 1 minutes (1 * 60)
@@ -133,6 +133,12 @@ if ($repoStatus -ne "")
133133
$result = Invoke-RestMethod -Method Post -UserAgent [Microsoft.PowerShell.Commands.PSUserAgent]::InternetExplorer -Uri $githubApiEndpoint -Header $headers -ContentType "application/json" -Body $prRequestBody
134134
'Started PR with dependencies update...' | Write-Host -NoNewline
135135
'OK' | Write-Host -ForegroundColor Green
136+
137+
# add labels to PR
138+
$prNumber = $result.number
139+
140+
gh pr edit $prNumber --add-label "VS2019"
141+
gh pr edit $prNumber --add-label "VS2022"
136142
}
137143
catch
138144
{

0 commit comments

Comments
 (0)