diff --git a/eng/common/pipelines/templates/steps/detect-api-changes.yml b/eng/common/pipelines/templates/steps/detect-api-changes.yml index 5210ebbe4b61..f39a88eaa3a5 100644 --- a/eng/common/pipelines/templates/steps/detect-api-changes.yml +++ b/eng/common/pipelines/templates/steps/detect-api-changes.yml @@ -22,6 +22,7 @@ steps: -RepoFullName $(Build.Repository.Name) -APIViewUri $(ApiChangeDetectRequestUrl) -ArtifactName ${{ parameters.ArtifactName }} + -DevopsProject $(System.TeamProject) pwsh: true displayName: Detect API changes condition: and(succeededOrFailed(), eq(variables['Build.Reason'],'PullRequest')) diff --git a/eng/common/scripts/Create-APIReview.ps1 b/eng/common/scripts/Create-APIReview.ps1 index a3f22a2678de..c5c5e51f31b6 100644 --- a/eng/common/scripts/Create-APIReview.ps1 +++ b/eng/common/scripts/Create-APIReview.ps1 @@ -78,6 +78,7 @@ function Upload-SourceArtifact($filePath, $apiLabel, $releaseStatus, $packageVer try { $Response = Invoke-WebRequest -Method 'POST' -Uri $uri -Body $multipartContent -Headers $headers + Write-Host "API review: $($Response.Content)" $StatusCode = $Response.StatusCode } catch @@ -114,6 +115,7 @@ function Upload-ReviewTokenFile($packageName, $apiLabel, $releaseStatus, $review try { $Response = Invoke-WebRequest -Method 'GET' -Uri $uri -Headers $headers + Write-Host "API review: $($Response.Content)" $StatusCode = $Response.StatusCode } catch diff --git a/eng/common/scripts/Detect-Api-Changes.ps1 b/eng/common/scripts/Detect-Api-Changes.ps1 index 572ef43e1cf5..522346502332 100644 --- a/eng/common/scripts/Detect-Api-Changes.ps1 +++ b/eng/common/scripts/Detect-Api-Changes.ps1 @@ -15,7 +15,8 @@ Param ( [string] $APIViewUri, [string] $RepoFullName = "", [string] $ArtifactName = "packages", - [string] $TargetBranch = ("origin/${env:SYSTEM_PULLREQUEST_TARGETBRANCH}" -replace "refs/heads/") + [string] $TargetBranch = ("origin/${env:SYSTEM_PULLREQUEST_TARGETBRANCH}" -replace "refs/heads/"), + [string] $DevopsProject = "internal" ) . (Join-Path $PSScriptRoot common.ps1) @@ -37,6 +38,7 @@ function Submit-Request($filePath, $packageName) $query.Add('pullRequestNumber', $PullRequestNumber) $query.Add('packageName', $packageName) $query.Add('language', $LanguageShort) + $query.Add('project', $DevopsProject) $reviewFileFullName = Join-Path -Path $ArtifactPath $packageName $reviewFileName if (Test-Path $reviewFileFullName) { @@ -87,6 +89,7 @@ function Log-Input-Params() Write-Host "Language: $($Language)" Write-Host "Commit SHA: $($CommitSha)" Write-Host "Repo Name: $($RepoFullName)" + Write-Host "Project: $($DevopsProject)" } Log-Input-Params