File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ $changedFiles = @()
4848$changedServices = @ ()
4949
5050$changedFiles = Get-ChangedFiles - DiffPath $TargetPath
51+ $deletedFiles = Get-ChangedFiles - DiffPath $TargetPath - DiffFilterType " D"
5152
5253if ($changedFiles ) {
5354 $changedServices = Get-ChangedServices - ChangedFiles $changedFiles
@@ -63,6 +64,7 @@ $result = [PSCustomObject]@{
6364 " ChangedFiles" = $changedFiles
6465 " ChangedServices" = $changedServices
6566 " ExcludePaths" = $ExcludePaths
67+ " DeletedFiles" = $deletedFiles
6668 " PRNumber" = if ($env: SYSTEM_PULLREQUEST_PULLREQUESTNUMBER ) { $env: SYSTEM_PULLREQUEST_PULLREQUESTNUMBER } else { " -1" }
6769}
6870
Original file line number Diff line number Diff line change @@ -162,6 +162,14 @@ function Get-PrPkgProperties([string]$InputDiffJson) {
162162 $allPackageProperties = Get-AllPkgProperties
163163 $diff = Get-Content $InputDiffJson | ConvertFrom-Json
164164 $targetedFiles = $diff.ChangedFiles
165+
166+ if ($diff.DeletedFiles ) {
167+ if (-not $targetedFiles ) {
168+ $targetedFiles = @ ()
169+ }
170+ $targetedFiles += $diff.DeletedFiles
171+ }
172+
165173 # The exclude paths and the targeted files paths aren't full OS paths, they're
166174 # GitHub paths meaning they're relative to the repo root and slashes are forward
167175 # slashes "/". The ExcludePaths need to have a trailing slash added in order
You can’t perform that action at this time.
0 commit comments