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 = @()
48
48
$changedServices = @ ()
49
49
50
50
$changedFiles = Get-ChangedFiles - DiffPath $TargetPath
51
+ $deletedFiles = Get-ChangedFiles - DiffPath $TargetPath - DiffFilterType " D"
51
52
52
53
if ($changedFiles ) {
53
54
$changedServices = Get-ChangedServices - ChangedFiles $changedFiles
@@ -63,6 +64,7 @@ $result = [PSCustomObject]@{
63
64
" ChangedFiles" = $changedFiles
64
65
" ChangedServices" = $changedServices
65
66
" ExcludePaths" = $ExcludePaths
67
+ " DeletedFiles" = $deletedFiles
66
68
" PRNumber" = if ($env: SYSTEM_PULLREQUEST_PULLREQUESTNUMBER ) { $env: SYSTEM_PULLREQUEST_PULLREQUESTNUMBER } else { " -1" }
67
69
}
68
70
Original file line number Diff line number Diff line change @@ -162,6 +162,14 @@ function Get-PrPkgProperties([string]$InputDiffJson) {
162
162
$allPackageProperties = Get-AllPkgProperties
163
163
$diff = Get-Content $InputDiffJson | ConvertFrom-Json
164
164
$targetedFiles = $diff.ChangedFiles
165
+
166
+ if ($diff.DeletedFiles ) {
167
+ if (-not $targetedFiles ) {
168
+ $targetedFiles = @ ()
169
+ }
170
+ $targetedFiles += $diff.DeletedFiles
171
+ }
172
+
165
173
# The exclude paths and the targeted files paths aren't full OS paths, they're
166
174
# GitHub paths meaning they're relative to the repo root and slashes are forward
167
175
# slashes "/". The ExcludePaths need to have a trailing slash added in order
You can’t perform that action at this time.
0 commit comments