summaryrefslogtreecommitdiff
path: root/app/mailers/emails/projects.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/mailers/emails/projects.rb')
-rw-r--r--app/mailers/emails/projects.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/app/mailers/emails/projects.rb b/app/mailers/emails/projects.rb
index 4bc40b35f2d..f2e599ab28b 100644
--- a/app/mailers/emails/projects.rb
+++ b/app/mailers/emails/projects.rb
@@ -23,21 +23,24 @@ module Emails
@commits = Commit.decorate(compare.commits)
@diffs = compare.diffs
@branch = branch
+
+ @subject = "[#{@project.path_with_namespace}][#{@branch}] "
+
if @commits.length > 1
@target_url = namespace_project_compare_url(@project.namespace,
@project,
from: @commits.first,
to: @commits.last)
- @subject = "#{@commits.length} new commits pushed to repository"
+ @subject << "#{@commits.length} commits: #{@commits.first.title}"
else
@target_url = namespace_project_commit_url(@project.namespace,
@project, @commits.first)
- @subject = @commits.first.title
+ @subject << @commits.first.title
end
mail(from: sender(author_id),
to: recipient,
- subject: subject(@subject))
+ subject: @subject)
end
end
end