This instance will be upgraded to Heptapod 0.31.0 (final) on 2022-05-24 at 14:00 UTC+2 (a few minutes of down time)

Unverified Commit 55440ac9 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Make a comment to MR whne milestone was changed


Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent bdc91e38476e
......@@ -16,5 +16,9 @@ def execute_hooks(merge_request)
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 @@ def execute(merge_request)
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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment