Skip to content

Commit

Permalink
Update script to have PR check (Azure#18102)
Browse files Browse the repository at this point in the history
  • Loading branch information
HarveyLink authored Jan 21, 2021
1 parent fbf50d6 commit 3c096ab
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions eng/scripts/Track1CodeCheck.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ function Find-Mapping([string]$path) {

try {
Write-Output "======== Start Code Validation ========"

Write-Host "Check PR associate"
if (($null -eq $Env:REPOSITORY_NAME) -or ($null -eq $Env:PULLREQUEST_ID) -or ($Env:REPOSITORY_NAME -eq "") -or ($Env:PULLREQUEST_ID -eq "")) {
Write-Host "There is no PR associate with this run, skip the code check." -ForegroundColor red -BackgroundColor white
break
}

# Get RP Mapping
Write-Output "Start RP mapping "
$RPMapping = [ordered]@{ }
Expand Down

0 comments on commit 3c096ab

Please sign in to comment.