diff options
Diffstat (limited to 'app/finders/merge_requests_finder.rb')
-rw-r--r-- | app/finders/merge_requests_finder.rb | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/app/finders/merge_requests_finder.rb b/app/finders/merge_requests_finder.rb index f1c5d5e08ad..f7ee90ab870 100644 --- a/app/finders/merge_requests_finder.rb +++ b/app/finders/merge_requests_finder.rb @@ -158,19 +158,15 @@ class MergeRequestsFinder < IssuableFinder return items if draft_param.nil? if draft_param - items.where(wip_match(items.arel_table)) + items.where(draft_match(items.arel_table)) else - items.where.not(wip_match(items.arel_table)) + items.where.not(draft_match(items.arel_table)) end end # rubocop: enable CodeReuse/ActiveRecord - # WIP is deprecated in favor of Draft. Currently both options are supported - def wip_match(table) - table[:title].matches('WIP:%') - .or(table[:title].matches('WIP %')) - .or(table[:title].matches('[WIP]%')) - .or(table[:title].matches('Draft - %')) + def draft_match(table) + table[:title].matches('Draft - %') .or(table[:title].matches('Draft:%')) .or(table[:title].matches('[Draft]%')) .or(table[:title].matches('(Draft)%')) |