Note on merge request open/close

This commit is contained in:
Dmitriy Zaporozhets 2012-01-03 21:46:53 +02:00
parent e29b7d52fc
commit 8d7aaf0e55

View file

@ -59,6 +59,13 @@ class MailerObserver < ActiveRecord::Observer
Notify.changed_merge_request_email(user, merge_request).deliver Notify.changed_merge_request_email(user, merge_request).deliver
end end
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 end
def changed_issue(issue) def changed_issue(issue)