Skip to content
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
9 changes: 9 additions & 0 deletions eng/common/scripts/Detect-Api-Changes.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,18 @@ function Submit-Request($filePath, $packageName)
$query.Add('language', $LanguageShort)
$query.Add('project', $DevopsProject)
$reviewFileFullName = Join-Path -Path $ArtifactPath $packageName $reviewFileName
# If CI generates token file then it passes both token file name and original file (filePath) to APIView
# If both files are passed then APIView downloads the parent directory as a zip
# If code file is not passed(for e.g. .NET or Java) then APIView needs full path to original file to download only that file.
if (Test-Path $reviewFileFullName)
{
$query.Add('codeFile', $reviewFileName)
# Pass only relative path in package artifact directory when code file is also present
$query.Add('filePath', (Split-Path -Leaf $filePath))
}
else
{
$query.Add('filePath', $filePath)
}
$uri = [System.UriBuilder]$APIViewUri
$uri.query = $query.toString()
Expand Down
Loading