summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2019-03-13 14:33:55 +0000
committerRobert Speicher <rspeicher@gmail.com>2019-03-13 14:33:55 +0000
commit69ed9ae4d4bc0a64713c9a01d6ac27f9fc303101 (patch)
tree69d9a1886df4ed8dc110a018656d6270c0120004 /lib
parent99c49164bb52a04badc2efbb4872159059f1c066 (diff)
parenteba5672077f5d7956fc8f7db583136b3ccb451b5 (diff)
downloadgitlab-ce-69ed9ae4d4bc0a64713c9a01d6ac27f9fc303101.tar.gz
Merge branch 'allow-filtering-labels-by-a-single-character' into 'master'
Allow filtering labels by a single character Closes #58795 See merge request gitlab-org/gitlab-ce!26012
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/sql/pattern.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/gitlab/sql/pattern.rb b/lib/gitlab/sql/pattern.rb
index 07d0acdbae9..b698391c8bd 100644
--- a/lib/gitlab/sql/pattern.rb
+++ b/lib/gitlab/sql/pattern.rb
@@ -23,8 +23,12 @@ module Gitlab
end
end
+ def min_chars_for_partial_matching
+ MIN_CHARS_FOR_PARTIAL_MATCHING
+ end
+
def partial_matching?(query)
- query.length >= MIN_CHARS_FOR_PARTIAL_MATCHING
+ query.length >= min_chars_for_partial_matching
end
# column - The column name to search in.