Skip to content

Commit e2663be

Browse files
azure-sdkpraveenkuttappanweshaggard
authored
Sync eng/common directory with azure-sdk-tools for PR 2046 (Azure#24280)
* Pass package name from calling pipeline to uniquely identify pull request review * Update log summary * Update eng/common/scripts/Detect-Api-Changes.ps1 Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com> Co-authored-by: praveenkuttappan <prmarott@microsoft.com> Co-authored-by: praveenkuttappan <55455725+praveenkuttappan@users.noreply.github.com> Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>
1 parent 58c5a48 commit e2663be

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

eng/common/scripts/Detect-Api-Changes.ps1

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Param (
1616
)
1717

1818
# Submit API review request and return status whether current revision is approved or pending or failed to create review
19-
function Submit-Request($filePath)
19+
function Submit-Request($filePath, $packageName)
2020
{
2121
$repoName = $RepoFullName
2222
if (!$repoName) {
@@ -29,6 +29,7 @@ function Submit-Request($filePath)
2929
$query.Add('commitSha', $CommitSha)
3030
$query.Add('repoName', $repoName)
3131
$query.Add('pullRequestNumber', $PullRequestNumber)
32+
$query.Add('packageName', $packageName)
3233
$uri = [System.UriBuilder]$APIViewUri
3334
$uri.query = $query.toString()
3435
Write-Host "Request URI: $($uri.Uri.OriginalString)"
@@ -71,6 +72,7 @@ function Log-Input-Params()
7172
Write-Host "Language: $($Language)"
7273
Write-Host "Commit SHA: $($CommitSha)"
7374
Write-Host "Repo Name: $($RepoFullName)"
75+
Write-Host "Package Name: $($PackageName)"
7476
}
7577

7678
. (Join-Path $PSScriptRoot common.ps1)
@@ -95,7 +97,7 @@ foreach ($artifact in $ArtifactList)
9597
if (Should-Process-Package -pkgPath $pkgPath -packageName $artifact.name)
9698
{
9799
$filePath = $pkgPath.Replace($ArtifactPath , "").Replace("\", "/")
98-
$respCode = Submit-Request -filePath $filePath
100+
$respCode = Submit-Request -filePath $filePath -packageName $artifact.name
99101
if ($respCode -ne '200')
100102
{
101103
$responses[$artifact.name] = $respCode
@@ -108,12 +110,7 @@ foreach ($artifact in $ArtifactList)
108110
}
109111
}
110112

111-
if ($responses)
113+
foreach($pkg in $responses.keys)
112114
{
113-
# Will update this with a link to wiki on how to resolve
114-
Write-Warning "API change detection failed for following packages. Please check above for package level error details."
115-
foreach($pkg in $responses.keys)
116-
{
117-
Write-Host "$pkg failed with $($responses[$pkg]) code"
118-
}
115+
Write-Host "API detection request status for $($pkg) : $($responses[$pkg])"
119116
}

0 commit comments

Comments
 (0)