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:
Diffstat (limited to 'lib/gitlab/analytics/cycle_analytics/request_params.rb')
-rw-r--r--lib/gitlab/analytics/cycle_analytics/request_params.rb27
1 files changed, 26 insertions, 1 deletions
diff --git a/lib/gitlab/analytics/cycle_analytics/request_params.rb b/lib/gitlab/analytics/cycle_analytics/request_params.rb
index 2c4b0215307..cea25ba2db4 100644
--- a/lib/gitlab/analytics/cycle_analytics/request_params.rb
+++ b/lib/gitlab/analytics/cycle_analytics/request_params.rb
@@ -12,6 +12,24 @@ module Gitlab
MAX_RANGE_DAYS = 180.days.freeze
DEFAULT_DATE_RANGE = 29.days # 30 including Date.today
+ NEGATABLE_PARAMS = [
+ :assignee_username,
+ :author_username,
+ :epic_id,
+ :iteration_id,
+ :label_name,
+ :milestone_title,
+ :my_reaction_emoji,
+ :weight
+ ].freeze
+
+ LICENSED_PARAMS = [
+ :weight,
+ :epic_id,
+ :my_reaction_emoji,
+ :iteration_id
+ ].freeze
+
STRONG_PARAMS_DEFINITION = [
:created_before,
:created_after,
@@ -22,9 +40,11 @@ module Gitlab
:page,
:stage_id,
:end_event_filter,
+ *LICENSED_PARAMS,
label_name: [].freeze,
assignee_username: [].freeze,
- project_ids: [].freeze
+ project_ids: [].freeze,
+ not: NEGATABLE_PARAMS
].freeze
FINDER_PARAM_NAMES = [
@@ -46,6 +66,11 @@ module Gitlab
attribute :page
attribute :stage_id
attribute :end_event_filter
+ attribute :weight
+ attribute :epic_id
+ attribute :my_reaction_emoji
+ attribute :iteration_id
+ attribute :not, default: -> { {} }
FINDER_PARAM_NAMES.each do |param_name|
attribute param_name