Class: Gitlab::Analytics::CycleAnalytics::StageEvents::MergeRequestFirstDeployedToProduction

Inherits:
MetricsBasedStageEvent show all
Defined in:
lib/gitlab/analytics/cycle_analytics/stage_events/merge_request_first_deployed_to_production.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from MetricsBasedStageEvent

#apply_negated_query_customization, #include_in

Methods inherited from StageEvent

#apply_negated_query_customization, #hash_code, #html_description, #include_in, #initialize, label_based?, #timestamp_projection

Methods included from Utils::Override

#extended, extensions, #included, #method_added, #override, #prepended, #queue_verification, verify!

Methods included from CycleAnalytics::MetricsTables

#build_table, #issue_metrics_table, #issue_table, #mr_closing_issues_table, #mr_diff_commits_table, #mr_diff_table, #mr_metrics_table, #mr_table, #projects_table, #routes_table, #user_table

Constructor Details

This class inherits a constructor from Gitlab::Analytics::CycleAnalytics::StageEvents::StageEvent

Class Method Details

.identifierObject



12
13
14
# File 'lib/gitlab/analytics/cycle_analytics/stage_events/merge_request_first_deployed_to_production.rb', line 12

def self.identifier
  :merge_request_first_deployed_to_production
end

.nameObject



8
9
10
# File 'lib/gitlab/analytics/cycle_analytics/stage_events/merge_request_first_deployed_to_production.rb', line 8

def self.name
  s_("CycleAnalyticsEvent|Merge request first deployed to production")
end

Instance Method Details

#apply_query_customization(query) ⇒ Object

rubocop: disable CodeReuse/ActiveRecord



25
26
27
# File 'lib/gitlab/analytics/cycle_analytics/stage_events/merge_request_first_deployed_to_production.rb', line 25

def apply_query_customization(query)
  super.where(timestamp_projection.gteq(mr_table[:created_at]))
end

#column_listObject



20
21
22
# File 'lib/gitlab/analytics/cycle_analytics/stage_events/merge_request_first_deployed_to_production.rb', line 20

def column_list
  [mr_metrics_table[:first_deployed_to_production_at]]
end

#object_typeObject



16
17
18
# File 'lib/gitlab/analytics/cycle_analytics/stage_events/merge_request_first_deployed_to_production.rb', line 16

def object_type
  MergeRequest
end