Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-02-20 19:43:28 +0300
committerDouwe Maan <douwe@gitlab.com>2015-02-25 15:13:27 +0300
commit607f0c05feb2cde82493a36ac43ba5ecd6c71620 (patch)
tree34a0bdd31f5e022ce077475d069f2ec1a6d77dc7 /app/mailers/emails
parenta30a56634d3ea44ccfc69c037324b502456f9aba (diff)
Change EmailsOnPush subject to include namespace, repo and branch.
See #1827.
Diffstat (limited to 'app/mailers/emails')
-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