Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend APIView Search to support PullRequest in General Search #5586

Merged
merged 1 commit into from
Mar 10, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ public async Task<IEnumerable<string>> GetReviewFirstLevelPropertiesAsync(string
queryStringBuilder.Append($" OR CONTAINS(r.Name, {query}, true)");
queryStringBuilder.Append($" OR CONTAINS(r.ServiceName, {query}, true)");
queryStringBuilder.Append($" OR CONTAINS(r.PackageDisplayName, {query}, true)");
queryStringBuilder.Append($" OR ENDSWITH(ARRAY_SLICE(r.Revisions, -1)[0].Label, {query}, true)");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am a bit late to comment here. But CONTAINS would have been better here instead of Endswith to avoid any assumption that PR number will always be at the end of label. Label is generated by each language side script, and there is no specific rule for naming convention, and it can add any additional info in the future without knowing it will break in APIVIew side search.

}
queryStringBuilder.Append($")");
}
Expand Down