diff --git a/eng/common/scripts/Generate-PR-Diff.ps1 b/eng/common/scripts/Generate-PR-Diff.ps1 index 3b508b1cb9..5c3d764009 100644 --- a/eng/common/scripts/Generate-PR-Diff.ps1 +++ b/eng/common/scripts/Generate-PR-Diff.ps1 @@ -41,8 +41,13 @@ if (!(Test-Path $ArtifactPath)) $ArtifactPath = Resolve-Path $ArtifactPath $ArtifactName = Join-Path $ArtifactPath "diff.json" +$changedFiles = @() +$changedServices = @() + $changedFiles = Get-ChangedFiles -DiffPath $TargetPath -$changedServices = Get-ChangedServices -ChangedFiles $changedFiles +if ($changedFiles) { + $changedServices = Get-ChangedServices -ChangedFiles $changedFiles +} $result = [PSCustomObject]@{ "ChangedFiles" = $changedFiles