Class: Issuables::LabelFilter

Inherits:
BaseFilter show all
Extended by:
Gitlab::Cache::RequestCache
Includes:
Gitlab::Utils::StrongMemoize
Defined in:
app/finders/issuables/label_filter.rb

Constant Summary

Constants inherited from BaseFilter

BaseFilter::FILTER_ANY, BaseFilter::FILTER_NONE

Instance Attribute Summary

Attributes included from Gitlab::Cache::RequestCache

#request_cache_key_block

Attributes inherited from BaseFilter

#params

Instance Method Summary collapse

Methods included from Gitlab::Cache::RequestCache

extended, request_cache, request_cache_key

Constructor Details

#initialize(project:, group:, **kwargs) ⇒ LabelFilter

Returns a new instance of LabelFilter.



8
9
10
11
12
13
# File 'app/finders/issuables/label_filter.rb', line 8

def initialize(project:, group:, **kwargs)
  @project = project
  @group = group

  super(**kwargs)
end

Instance Method Details

#filter(issuables) ⇒ Object



15
16
17
18
19
# File 'app/finders/issuables/label_filter.rb', line 15

def filter(issuables)
  filtered = by_label(issuables)
  filtered = by_label_union(filtered)
  by_negated_label(filtered)
end

#label_names_excluded_from_priority_sortObject



21
22
23
# File 'app/finders/issuables/label_filter.rb', line 21

def label_names_excluded_from_priority_sort
  label_names_from_params
end