Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send package version for Python api review #34746

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Send pacakge version for Python api review
  • Loading branch information
praveenkuttappan committed Mar 13, 2024
commit 912fea94b35549a314b133de04b964749644cff8
8 changes: 4 additions & 4 deletions eng/scripts/Create-ApiReview.ps1
Original file line number Diff line number Diff line change
@@ -28,10 +28,10 @@ Set-StrictMode -Version 3
. (Join-Path $PSScriptRoot ".." common scripts common.ps1)
praveenkuttappan marked this conversation as resolved.
Show resolved Hide resolved

# Submit API review request and return status whether current revision is approved or pending or failed to create review
function Submit-APIReview($packageArtifactname, $apiLabel, $releaseStatus, $reviewFileName)
function Submit-APIReview($packageArtifactname, $apiLabel, $releaseStatus, $reviewFileName, $packageVersion)
{
$params = "buildId=$buildId&artifactName=$ArtifactName&originalFilePath=$packageArtifactname&reviewFilePath=$reviewFileName"
$params += "&label=$apiLabel&repoName=$repoName&packageName=$PackageName&project=internal"
$params += "&label=$apiLabel&repoName=$repoName&packageName=$PackageName&project=internal&packageVersion=$packageVersion"
$uri = "$($APIViewUri)?$params"

Write-Host $uri
@@ -101,7 +101,7 @@ function ProcessPackage($PackageName)
return 1
}

$revisionLabel = "$($pkgInfo.Version) - Source Branch:${SourceBranch}"
$revisionLabel = "Source Branch:${SourceBranch}"
Write-Host "Version: $($version)"
Write-Host "SDK Type: $($pkgInfo.SdkType)"
Write-Host "Release Status: $($pkgInfo.ReleaseStatus)"
@@ -112,7 +112,7 @@ function ProcessPackage($PackageName)
if ( ($SourceBranch -eq $DefaultBranch) -or (-not $version.IsPrerelease))
{
Write-Host "Submitting API Review for package $($pkg)"
$respCode = Submit-APIReview -reviewFileName $reviewFileName -packageArtifactname $pkg -apiLabel $revisionLabel -releaseStatus $pkgInfo.ReleaseStatus
$respCode = Submit-APIReview -reviewFileName $reviewFileName -packageArtifactname $pkg -apiLabel $revisionLabel -releaseStatus $pkgInfo.ReleaseStatus -packageVersion $pkgInfo.Version
Write-Host "HTTP Response code: $($respCode)"
# HTTP status 200 means API is in approved status
if ($respCode -eq '200')