Skip to content

Commit 8281370

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

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

azure-pipelines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ jobs:
400400
targetType: filePath
401401
filePath: azure-pipelines/update-dependencies.ps1
402402
env:
403-
GH_TOKEN: $(GitHubToken)
403+
GITHUB_TOKEN: $(GitHubToken)
404404

405405
##################################
406406
# report build failure to Discord

azure-pipelines/update-dependencies.ps1

Lines changed: 7 additions & 1 deletion
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
# init/reset these
1111
$prTitle = ""
@@ -127,6 +127,12 @@ if ($repoStatus -ne "") {
127127
$result = Invoke-RestMethod -Method Post -UserAgent [Microsoft.PowerShell.Commands.PSUserAgent]::InternetExplorer -Uri $githubApiEndpoint -Header $headers -ContentType "application/json" -Body $prRequestBody
128128
'Started PR with dependencies update...' | Write-Host -NoNewline
129129
'OK' | Write-Host -ForegroundColor Green
130+
131+
# add labels to PR
132+
$prNumber = $result.number
133+
134+
gh pr edit $prNumber --add-label "VS2019"
135+
gh pr edit $prNumber --add-label "VS2022"
130136
}
131137
catch {
132138
$result = $_.Exception.Response.GetResponseStream()

0 commit comments

Comments
 (0)