Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-11 09:06:27 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-11 09:06:27 +0300
commitb4e072cbaf808793bafff148b0ec9d47819f479e (patch)
treec690c706803cf43b3358785681e693ea0e1f9f94 /lib/event_filter.rb
parent8c0166b9816477521bf34feb15575bbeb1a3c644 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/event_filter.rb')
-rw-r--r--lib/event_filter.rb11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/event_filter.rb b/lib/event_filter.rb
index 85bf9c14f26..e062e3ddb1c 100644
--- a/lib/event_filter.rb
+++ b/lib/event_filter.rb
@@ -9,12 +9,11 @@ class EventFilter
ISSUE = 'issue'
COMMENTS = 'comments'
TEAM = 'team'
- FILTERS = [ALL, PUSH, MERGED, ISSUE, COMMENTS, TEAM].freeze
def initialize(filter)
# Split using comma to maintain backward compatibility Ex/ "filter1,filter2"
filter = filter.to_s.split(',')[0].to_s
- @filter = FILTERS.include?(filter) ? filter : ALL
+ @filter = filters.include?(filter) ? filter : ALL
end
def active?(key)
@@ -39,4 +38,12 @@ class EventFilter
end
end
# rubocop: enable CodeReuse/ActiveRecord
+
+ private
+
+ def filters
+ [ALL, PUSH, MERGED, ISSUE, COMMENTS, TEAM]
+ end
end
+
+EventFilter.prepend_if_ee('EE::EventFilter')