Make a comment to MR whne milestone was changed
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
parent
525fa6c11b
commit
55440ac9be
2 changed files with 8 additions and 0 deletions
|
@ -16,5 +16,9 @@ module MergeRequests
|
|||
merge_request.project.execute_hooks(merge_request.to_hook_data, :merge_request_hooks)
|
||||
end
|
||||
end
|
||||
|
||||
def create_milestone_note(merge_request)
|
||||
Note.create_milestone_change_note(merge_request, merge_request.project, current_user, merge_request.milestone)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -22,6 +22,10 @@ module MergeRequests
|
|||
if params.present? && merge_request.update_attributes(params)
|
||||
merge_request.reset_events_cache
|
||||
|
||||
if merge_request.previous_changes.include?('milestone_id')
|
||||
create_milestone_note(merge_request)
|
||||
end
|
||||
|
||||
if merge_request.previous_changes.include?('assignee_id')
|
||||
notification_service.reassigned_merge_request(merge_request, current_user)
|
||||
create_assignee_note(merge_request)
|
||||
|
|
Loading…
Reference in a new issue