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

resource_milestone_event.rb « models « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2b93334f72145c7e8c2452c5fdb40cf83c546f34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# frozen_string_literal: true

class ResourceMilestoneEvent < ResourceTimeboxEvent
  include EachBatch

  belongs_to :milestone

  scope :include_relations, -> { includes(:user, milestone: [:project, :group]) }

  # state is used for issue and merge request states.
  enum state: Issue.available_states.merge(MergeRequest.available_states)

  def milestone_title
    milestone&.title
  end

  def milestone_parent
    milestone&.parent
  end

  def synthetic_note_class
    MilestoneNote
  end
end

ResourceMilestoneEvent.prepend_mod