Commit 8d7aaf0e authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Note on merge request open/close

parent e29b7d52
......@@ -59,6 +59,13 @@ class MailerObserver < ActiveRecord::Observer
Notify.changed_merge_request_email(user, merge_request).deliver
end
end
if merge_request.closed_changed?
note = Note.new(:noteable => merge_request, :project => merge_request.project)
note.author = current_user
note.note = "_Status changed to #{merge_request.closed ? 'closed' : 'reopened'}_"
note.save()
end
end
def changed_issue(issue)
......
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