search: highlight repo:has.description match ranges
Created by: tbliu98
Part of #18374
This PR adds highlighting for ranges in the visible portion of repo descriptions that are matched by repo:has.description.
- During
RepoSearchJobconstruction, compile anyrepo:has.descriptionpatterns into regexes that match case-insensitively and across newline characters - During
RepoSearchJobexecution, get resolved repositories' descriptions from the database, match them against the list of compiled regexes, and return the matched ranges as the fieldDescriptionMatchesonresult.RepoMatch - Add field
DescriptionMatchestoEventRepoMatchand populate it with the values fromresult.RepoMatchinfrontend - Add field
descriptionMatchestoRepositoryMatchinterface in the client - Use
highlightNodeto highlight matched ranges in theRepoSearchResultcomponent
Test plan
Unit tests, manual testing. highlightNode is well-tested
