Sync eng/common directory with azure-sdk-tools for PR 3735 (#3845)
* Detect API changes using new snadboxinx approach * Added strictmode * Remove unset variable * Changes as per strict mode 3 * Rervert strict mode to allow language level fixes to merge first Co-authored-by: praveenkuttappan <prmarott@microsoft.com>
This commit is contained in:
parent
8cb8a43b6c
commit
ea2d3adb91
@ -27,6 +27,7 @@ function Submit-Request($filePath, $packageName)
|
||||
if (!$repoName) {
|
||||
$repoName = "azure/azure-sdk-for-$LanguageShort"
|
||||
}
|
||||
$reviewFileName = "$($packageName)_$($LanguageShort).json"
|
||||
$query = [System.Web.HttpUtility]::ParseQueryString('')
|
||||
$query.Add('artifactName', $ArtifactName)
|
||||
$query.Add('buildId', $BuildId)
|
||||
@ -35,6 +36,12 @@ function Submit-Request($filePath, $packageName)
|
||||
$query.Add('repoName', $repoName)
|
||||
$query.Add('pullRequestNumber', $PullRequestNumber)
|
||||
$query.Add('packageName', $packageName)
|
||||
$query.Add('language', $LanguageShort)
|
||||
$reviewFileFullName = Join-Path -Path $ArtifactPath $packageName $reviewFileName
|
||||
if (Test-Path $reviewFileFullName)
|
||||
{
|
||||
$query.Add('codeFile', $reviewFileName)
|
||||
}
|
||||
$uri = [System.UriBuilder]$APIViewUri
|
||||
$uri.query = $query.toString()
|
||||
Write-Host "Request URI: $($uri.Uri.OriginalString)"
|
||||
@ -65,7 +72,7 @@ function Should-Process-Package($pkgPath, $packageName)
|
||||
# Get package info from json file created before updating version to daily dev
|
||||
$pkgInfo = Get-Content $pkgPropPath | ConvertFrom-Json
|
||||
$packagePath = $pkgInfo.DirectoryPath
|
||||
$modifiedFiles = Get-ChangedFiles -DiffPath "$packagePath/*" -DiffFilterType ''
|
||||
$modifiedFiles = @(Get-ChangedFiles -DiffPath "$packagePath/*" -DiffFilterType '')
|
||||
$filteredFileCount = $modifiedFiles.Count
|
||||
Write-Host "Number of modified files for package: $filteredFileCount"
|
||||
return ($filteredFileCount -gt 0 -and $pkgInfo.IsNewSdk)
|
||||
@ -80,7 +87,6 @@ function Log-Input-Params()
|
||||
Write-Host "Language: $($Language)"
|
||||
Write-Host "Commit SHA: $($CommitSha)"
|
||||
Write-Host "Repo Name: $($RepoFullName)"
|
||||
Write-Host "Package Name: $($PackageName)"
|
||||
}
|
||||
|
||||
Log-Input-Params
|
||||
|
||||
Loading…
Reference in New Issue
Block a user