diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-18 16:16:36 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-18 16:16:36 +0300 |
commit | 311b0269b4eb9839fa63f80c8d7a58f32b8138a0 (patch) | |
tree | 07e7870bca8aed6d61fdcc810731c50d2c40af47 /lib/gitlab/analytics/cycle_analytics/records_fetcher.rb | |
parent | 27909cef6c4170ed9205afa7426b8d3de47cbb0c (diff) |
Add latest changes from gitlab-org/gitlab@14-5-stable-eev14.5.0-rc42
Diffstat (limited to 'lib/gitlab/analytics/cycle_analytics/records_fetcher.rb')
-rw-r--r-- | lib/gitlab/analytics/cycle_analytics/records_fetcher.rb | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/lib/gitlab/analytics/cycle_analytics/records_fetcher.rb b/lib/gitlab/analytics/cycle_analytics/records_fetcher.rb index f94696e3186..140c4a300ca 100644 --- a/lib/gitlab/analytics/cycle_analytics/records_fetcher.rb +++ b/lib/gitlab/analytics/cycle_analytics/records_fetcher.rb @@ -8,23 +8,11 @@ module Gitlab include StageQueryHelpers include Gitlab::CycleAnalytics::MetricsTables - MAX_RECORDS = 20 - - MAPPINGS = { - Issue => { - serializer_class: AnalyticsIssueSerializer, - includes_for_query: { project: { namespace: [:route] }, author: [] }, - columns_for_select: %I[title iid id created_at author_id project_id] - }, - MergeRequest => { - serializer_class: AnalyticsMergeRequestSerializer, - includes_for_query: { target_project: [:namespace], author: [] }, - columns_for_select: %I[title iid id created_at author_id state_id target_project_id] - } - }.freeze - delegate :subject_class, to: :stage + MAX_RECORDS = Gitlab::Analytics::CycleAnalytics::Aggregated::RecordsFetcher::MAX_RECORDS + MAPPINGS = Gitlab::Analytics::CycleAnalytics::Aggregated::RecordsFetcher::MAPPINGS + def initialize(stage:, query:, params: {}) @stage = stage @query = query |