Skip to content
Snippets Groups Projects

search: add `has` aliases for `contains` predicates

Merged Warren Gifford requested to merge tl/add-contains-pred-aliases into main

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 use VisitTypedPredicate() 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

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
Please register or sign in to reply
Loading