adding missing parens to apiview-helpers (#6610)

Co-authored-by: Scott Beddall <scbedd@microsoft.com>
This commit is contained in:
Azure SDK Bot 2025-06-02 18:12:57 -07:00 committed by GitHub
parent 32e868cd5f
commit 4aa299da03
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -214,12 +214,12 @@ function Set-ApiViewCommentForPR {
try {
$existingComment = Get-GitHubIssueComments -RepoOwner $RepoOwner -RepoName $RepoName -IssueNumber $PrNumber -AuthToken $AuthToken
$existingAPIViewComment = $existingComment | Where-Object {
$existingAPIViewComment = $existingComment | Where-Object {
$_.body.StartsWith("**API Change Check**", [StringComparison]::OrdinalIgnoreCase) -or $_.body.StartsWith("## API Change Check", [StringComparison]::OrdinalIgnoreCase) }
} catch {
LogWarning "Failed to get comments from Pull Request: $PrNumber in repo: $repoFullName"
}
try {
if ($existingAPIViewComment) {
LogDebug "Updating existing APIView comment..."
@ -251,7 +251,7 @@ function Create-API-Review {
)
$specGenSDKContent = Get-Content -Path $SpecGenSDKArtifactPath -Raw | ConvertFrom-Json
$language = ($specGenSDKContent.language -split "-")[-1]
foreach ($requestData in $specGenSDKContent.apiViewRequestData) {
$requestUri = [System.UriBuilder]$apiviewEndpoint
$requestParam = [System.Web.HttpUtility]::ParseQueryString('')
@ -263,7 +263,7 @@ function Create-API-Review {
$requestParam.Add('packageName', $requestData.packageName)
$requestParam.Add('filePath', $requestData.filePath)
if ($language -ieq "python") {
$requestParam.Add('codeFile', Split-Path -Path $requestData.filePath -Leaf)
$requestParam.Add('codeFile', (Split-Path -Path $requestData.filePath -Leaf))
}
$requestParam.Add('language', $language)
$requestUri.query = $requestParam.toString()