Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e0a9bca

Browse files
azure-sdkscbedd
andauthored
Sync eng/common directory with azure-sdk-tools for PR 9658 (Azure#32610)
Sync eng/common directory with azure-sdk-tools for PR Azure/azure-sdk-tools#9658 See [eng/common workflow](https://github.com/Azure/azure-sdk-tools/blob/main/eng/common/README.md#workflow) Co-authored-by: Scott Beddall <[email protected]>
1 parent 1a9ecfa commit e0a9bca

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

eng/common/scripts/Generate-PR-Diff.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff 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

5253
if ($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

eng/common/scripts/Package-Properties.ps1

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)