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

Conversation

chidozieononiwu
Copy link
Member

@chidozieononiwu chidozieononiwu commented Mar 1, 2023

Support searching by pull request in general search.
Resolves #5465

@chidozieononiwu chidozieononiwu requested a review from a team as a code owner March 1, 2023 00:28
@chidozieononiwu chidozieononiwu merged commit 6c4332d into Azure:main Mar 10, 2023
@@ -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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

APIView bug with search bar
3 participants