Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions eng/common/scripts/Generate-PR-Diff.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ $changedFiles = @()
$changedServices = @()

$changedFiles = Get-ChangedFiles -DiffPath $TargetPath
$deletedFiles = Get-ChangedFiles -DiffPath $TargetPath -DiffFilterType "D"

if ($changedFiles) {
$changedServices = Get-ChangedServices -ChangedFiles $changedFiles
Expand All @@ -63,6 +64,7 @@ $result = [PSCustomObject]@{
"ChangedFiles" = $changedFiles
"ChangedServices" = $changedServices
"ExcludePaths" = $ExcludePaths
"DeletedFiles" = $deletedFiles
"PRNumber" = if ($env:SYSTEM_PULLREQUEST_PULLREQUESTNUMBER) { $env:SYSTEM_PULLREQUEST_PULLREQUESTNUMBER } else { "-1" }
}

Expand Down
8 changes: 8 additions & 0 deletions eng/common/scripts/Package-Properties.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,14 @@ function Get-PrPkgProperties([string]$InputDiffJson) {
$allPackageProperties = Get-AllPkgProperties
$diff = Get-Content $InputDiffJson | ConvertFrom-Json
$targetedFiles = $diff.ChangedFiles

if ($diff.DeletedFiles) {
if (-not $targetedFiles) {
$targetedFiles = @()
}
$targetedFiles += $diff.DeletedFiles
}

# The exclude paths and the targeted files paths aren't full OS paths, they're
# GitHub paths meaning they're relative to the repo root and slashes are forward
# slashes "/". The ExcludePaths need to have a trailing slash added in order
Expand Down
Loading