Sync eng/common directory with azure-sdk-tools for PR 9635 (#6350)

* ensure that packages that come back from AdditionalValidationPackages are NOT counted as 'includedForValidation: true' if they also exist in the original 'these packages changed' set

Co-authored-by: Ben Broderick Phillips <ben@benbp.net>

---------

Co-authored-by: Scott Beddall <scbedd@microsoft.com>
Co-authored-by: Scott Beddall <45376673+scbedd@users.noreply.github.com>
Co-authored-by: Ben Broderick Phillips <ben@benbp.net>
This commit is contained in:
Azure SDK Bot 2025-01-15 13:35:45 -08:00 committed by GitHub
parent 32b732cb78
commit 413e61ade4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -187,12 +187,17 @@ function Get-PrPkgProperties([string]$InputDiffJson) {
}
}
$existingPackageNames = @($packagesWithChanges | ForEach-Object { $_.Name })
foreach ($addition in $additionalValidationPackages) {
$key = $addition.Replace($RepoRoot, "").TrimStart('\/')
if ($lookup[$key]) {
$lookup[$key].IncludedForValidation = $true
$packagesWithChanges += $lookup[$key]
$pkg = $lookup[$key]
if ($pkg.Name -notin $existingPackageNames) {
$pkg.IncludedForValidation = $true
$packagesWithChanges += $pkg
}
}
}