From fd3889a5c3467de0c6148dbe27d661aa53316213 Mon Sep 17 00:00:00 2001 From: Chidozie Ononiwu <31145988+chidozieononiwu@users.noreply.github.com> Date: Fri, 26 Apr 2024 20:26:06 -0700 Subject: [PATCH] Require Approval Check for Management Plane Packages (#8139) --- eng/common/scripts/Create-APIReview.ps1 | 7 ++++++- eng/common/scripts/common.ps1 | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/eng/common/scripts/Create-APIReview.ps1 b/eng/common/scripts/Create-APIReview.ps1 index c5c5e51f31b..5438df06710 100644 --- a/eng/common/scripts/Create-APIReview.ps1 +++ b/eng/common/scripts/Create-APIReview.ps1 @@ -161,7 +161,12 @@ function Submit-APIReview($packageInfo, $packagePath, $packageArtifactName) function IsApiviewStatusCheckRequired($packageInfo) { - if (($packageInfo.SdkType -eq "client" -or $packageInfo.SdkType -eq "spring") -and $packageInfo.IsNewSdk) { + if ($IsApiviewStatusCheckRequiredFn -and (Test-Path "Function:$IsApiviewStatusCheckRequiredFn")) + { + return &$IsApiviewStatusCheckRequiredFn $packageInfo + } + + if ($packageInfo.SdkType -eq "client" -and $packageInfo.IsNewSdk) { return $true } return $false diff --git a/eng/common/scripts/common.ps1 b/eng/common/scripts/common.ps1 index cef0b23c562..0025d1c6fe6 100644 --- a/eng/common/scripts/common.ps1 +++ b/eng/common/scripts/common.ps1 @@ -62,6 +62,7 @@ $GetEmitterAdditionalOptionsFn = "Get-${Language}-EmitterAdditionalOptions" $GetEmitterNameFn = "Get-${Language}-EmitterName" $GetDirectoriesForGenerationFn = "Get-${Language}-DirectoriesForGeneration" $UpdateGeneratedSdksFn = "Update-${Language}-GeneratedSdks" +$IsApiviewStatusCheckRequiredFn = "Get-${Language}-ApiviewStatusCheckRequirement" # Expected to be set in eng/scripts/docs/Docs-Onboarding.ps1 $SetDocsPackageOnboarding = "Set-${Language}-DocsPackageOnboarding"