Skip to content

search: move compiled description pattern regex to a field on `RepoSearchJob`

Administrator requested to merge tl/compile-desc-pat-regex-early-2 into main

Created by: tbliu98

This PR adds DescriptionPatterns as a field of type []*regexp.Regexp on RepoSearchJob. Patterns passed to repo:has.description will be compiled to regex during job construction and populated in this field to avoid compiling regex during job execution.

This field is not yet used. Description pattern regex compilation will be added to the job construction step in the next PR when description match highlighting is added.

Test plan

Unit tests pass

Merge request reports

Loading