Skip to content

Commit d7d581b

Browse files
committed
Work CI-CD
- Add auth to git API request. ***NO_CI***
1 parent d69c9c3 commit d7d581b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

azure-pipelines.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ jobs:
7070

7171
# get commit message
7272
- powershell: |
73+
git config --global user.email "nfbot"
74+
git config --global user.name "[email protected]"
75+
76+
$auth = "basic $([System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes(":$(GitHubToken)")))"
7377
7478
# set default values
7579
echo "##vso[task.setvariable variable=RUN_MSCORLIB_TESTS;isOutput=true]false"
@@ -88,7 +92,7 @@ jobs:
8892
{
8993
Write-Host "##[command] **This is a PR build**"
9094
91-
$commit = Invoke-RestMethod -Uri "https://api.github.com/repos/nanoframework/nf-interpreter/commits/$(Build.SourceVersion)" -ContentType "application/json" -Method GET
95+
$commit = Invoke-RestMethod -Uri "https://api.github.com/repos/nanoframework/nf-interpreter/commits/$(Build.SourceVersion)" -Header @{"Authorization"="$auth"} -ContentType "application/json" -Method GET
9296
9397
if( ($commit.commit.author.name -eq "nfbot") -and ($commit.commit.message -like "*[version update]*") )
9498
{

0 commit comments

Comments
 (0)