search: add `has` aliases for `contains` predicates
Created by: tbliu98
Part of #39767 (closed)
- Introduce the following aliases:
-
repo:has.file==repo:contains.file -
repo:has.content==repo:contains.content -
repo:has.path==repo:contains.path -
repo:has.commit.after==repo:contains.commit.after -
file:has.content==file.contains.content
-
- Update
VisitTypedPredicate()to handle aliases - Update
FileContainsContent()to useVisitTypedPredicate()now that it handles aliases
Test plan
Add test for VisitTypedPredicate() to make sure aliases are recognized.
Manually test that has aliases return the same results as contains