gitlab-org--gitlab-foss/app/services/milestones/create_service.rb
2017-07-07 15:08:49 +00:00

13 lines
297 B
Ruby

module Milestones
class CreateService < Milestones::BaseService
def execute
milestone = parent.milestones.new(params)
if milestone.save && milestone.is_project_milestone?
event_service.open_milestone(milestone, current_user)
end
milestone
end
end
end