Alert commit author on note
Allows to alert only the commit author when a new note is added on a commit, useful when gitlabhq is used for code reviews, allows less noise with mails...
This commit is contained in:
parent
89a43543e9
commit
c0b47d3245
5 changed files with 13 additions and 2 deletions
|
@ -28,6 +28,7 @@ class Notify < ActionMailer::Base
|
|||
@note = note
|
||||
@project = note.project
|
||||
@commit = @project.repo.commits(note.noteable_id).first
|
||||
return unless ( note.notify or ( note.notify_author and @commit.author.email == @user.email ) )
|
||||
mail(:to => @user.email, :subject => "gitlab | #{@note.project.name} ")
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue