summaryrefslogtreecommitdiff
path: root/app/models/commit.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dzaporozhets@gitlab.com>2015-03-10 18:26:11 +0000
committerDmitriy Zaporozhets <dzaporozhets@gitlab.com>2015-03-10 18:26:11 +0000
commitf8ebe264ee725a3d98bf04ef8c7a1f22cfd55907 (patch)
treedb78dfbea34360c4c017c73b20204bf5e44a116c /app/models/commit.rb
parent52a12893747ddac4a38dfa5becd3231e5092619c (diff)
parent7499901c2421074b1730b8a803b9435a3f234506 (diff)
downloadgitlab-ci-f8ebe264ee725a3d98bf04ef8c7a1f22cfd55907.tar.gz
Merge branch 'notify_based_on_pusher_email' into 'master'
Notify only pusher instead of commiter Fixes #161 !!! Dependent MR on GitLab - https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/1630 See merge request !126
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r--app/models/commit.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb
index 11b61d4..2e1bd52 100644
--- a/app/models/commit.rb
+++ b/app/models/commit.rb
@@ -92,7 +92,11 @@ class Commit < ActiveRecord::Base
def project_recipients
recipients = project.email_recipients.split(' ')
- recipients << git_author_email if project.email_add_committer?
+
+ if project.email_add_pusher? && push_data[:user_email].present?
+ recipients << push_data[:user_email]
+ end
+
recipients.uniq
end