summaryrefslogtreecommitdiff
path: root/lib/gitlab/cycle_analytics/issue_event_fetcher.rb
blob: 3df9cbdcfce15fdb71083b2461a53a809638a85c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
module Gitlab
  module CycleAnalytics
    class IssueEventFetcher < BaseEventFetcher
      include IssueAllowed

      def initialize(*args)
        @projections = [issue_table[:title],
                        issue_table[:iid],
                        issue_table[:id],
                        issue_table[:created_at],
                        issue_table[:author_id]]

        super(*args)
      end

      private

      def serialize(event)
        AnalyticsIssueSerializer.new(project: @project).represent(event)
      end
    end
  end
end