gitlab-org--gitlab-foss/app/services/milestones/create_service.rb

16 lines
325 B
Ruby
Raw Normal View History

# frozen_string_literal: true
module Milestones
class CreateService < Milestones::BaseService
def execute
2017-07-07 11:08:49 -04:00
milestone = parent.milestones.new(params)
if milestone.save && milestone.project_milestone?
event_service.open_milestone(milestone, current_user)
end
milestone
end
end
end