summaryrefslogtreecommitdiff
path: root/app/services/milestones/create_service.rb
blob: b8e08c9f1eb167e97f496f359819b5c013c1aeb5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
module Milestones
  class CreateService < Milestones::BaseService
    def execute
      milestone = project.milestones.new(params)

      if milestone.save
        event_service.open_milestone(milestone, current_user)
      end

      milestone
    end
  end
end