@@ -214,12 +214,12 @@ function Set-ApiViewCommentForPR {
214
214
215
215
try {
216
216
$existingComment = Get-GitHubIssueComments - RepoOwner $RepoOwner - RepoName $RepoName - IssueNumber $PrNumber - AuthToken $AuthToken
217
- $existingAPIViewComment = $existingComment | Where-Object {
217
+ $existingAPIViewComment = $existingComment | Where-Object {
218
218
$_.body.StartsWith (" **API Change Check**" , [StringComparison ]::OrdinalIgnoreCase) -or $_.body.StartsWith (" ## API Change Check" , [StringComparison ]::OrdinalIgnoreCase) }
219
219
} catch {
220
220
LogWarning " Failed to get comments from Pull Request: $PrNumber in repo: $repoFullName "
221
221
}
222
-
222
+
223
223
try {
224
224
if ($existingAPIViewComment ) {
225
225
LogDebug " Updating existing APIView comment..."
@@ -251,7 +251,7 @@ function Create-API-Review {
251
251
)
252
252
$specGenSDKContent = Get-Content - Path $SpecGenSDKArtifactPath - Raw | ConvertFrom-Json
253
253
$language = ($specGenSDKContent.language -split " -" )[-1 ]
254
-
254
+
255
255
foreach ($requestData in $specGenSDKContent.apiViewRequestData ) {
256
256
$requestUri = [System.UriBuilder ]$apiviewEndpoint
257
257
$requestParam = [System.Web.HttpUtility ]::ParseQueryString(' ' )
@@ -263,7 +263,7 @@ function Create-API-Review {
263
263
$requestParam.Add (' packageName' , $requestData.packageName )
264
264
$requestParam.Add (' filePath' , $requestData.filePath )
265
265
if ($language -ieq " python" ) {
266
- $requestParam.Add (' codeFile' , Split-Path - Path $requestData.filePath - Leaf)
266
+ $requestParam.Add (' codeFile' , ( Split-Path - Path $requestData.filePath - Leaf) )
267
267
}
268
268
$requestParam.Add (' language' , $language )
269
269
$requestUri.query = $requestParam.toString ()
0 commit comments