summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre de La Morinerie <pierre@capitainetrain.com>2014-02-17 16:45:28 +0100
committerPierre de La Morinerie <pierre@capitainetrain.com>2014-02-19 18:25:18 +0100
commit44ab156ef45fb1a566395b4d98afe796b28d21c9 (patch)
tree3fdc4c636304a2de80f0a49b8324fbd8ebbdcceb
parent49cb1c7277d4b26cba8f28745ca9b9e348c72a50 (diff)
downloadgitlab-ce-44ab156ef45fb1a566395b4d98afe796b28d21c9.tar.gz
Remove the email subject prefix
This changes email subjects from: GitLab | Team / Project | Note for issue #1234 to: Team / Project | Note for issue #1234 Rationale: * Emails should be as meaningful as possible, and emphasize content over chrome. The "GitLab" name is more chrome than content. * Users can tell an email coming from GitLab by the sender or the header in the email content. * An organization that works mainly with GitLab knows that every SVC email comes from GitLab. For these organizations, having "GitLab" in front of every email is just noise hiding the meaningful information.
-rw-r--r--app/mailers/emails/merge_requests.rb2
-rw-r--r--app/mailers/notify.rb12
-rw-r--r--spec/mailers/notify_spec.rb6
3 files changed, 10 insertions, 10 deletions
diff --git a/app/mailers/emails/merge_requests.rb b/app/mailers/emails/merge_requests.rb
index e60887d525a..f0b3aab54ed 100644
--- a/app/mailers/emails/merge_requests.rb
+++ b/app/mailers/emails/merge_requests.rb
@@ -57,7 +57,7 @@ module Emails
# >> subject('Lorem ipsum', 'Dolor sit amet')
# => "GitLab Merge Request | Lorem ipsum | Dolor sit amet"
def subject(*extra)
- subject = "GitLab Merge Request |"
+ subject = "Merge Request | "
if @merge_request.for_fork?
subject << "#{@merge_request.source_project.name_with_namespace}:#{merge_request.source_branch} >> #{@merge_request.target_project.name_with_namespace}:#{merge_request.target_branch}"
else
diff --git a/app/mailers/notify.rb b/app/mailers/notify.rb
index e58db8ef35f..666cef4d3cb 100644
--- a/app/mailers/notify.rb
+++ b/app/mailers/notify.rb
@@ -43,21 +43,21 @@ class Notify < ActionMailer::Base
# Examples
#
# >> subject('Lorem ipsum')
- # => "GitLab | Lorem ipsum"
+ # => "Lorem ipsum"
#
# # Automatically inserts Project name when @project is set
# >> @project = Project.last
# => #<Project id: 1, name: "Ruby on Rails", path: "ruby_on_rails", ...>
# >> subject('Lorem ipsum')
- # => "GitLab | Ruby on Rails | Lorem ipsum "
+ # => "Ruby on Rails | Lorem ipsum "
#
# # Accepts multiple arguments
# >> subject('Lorem ipsum', 'Dolor sit amet')
- # => "GitLab | Lorem ipsum | Dolor sit amet"
+ # => "Lorem ipsum | Dolor sit amet"
def subject(*extra)
- subject = "GitLab"
- subject << (@project ? " | #{@project.name_with_namespace}" : "")
- subject << " | " + extra.join(' | ') if extra.present?
+ subject = ""
+ subject << "#{@project.name_with_namespace} | " if @project
+ subject << extra.join(' | ') if extra.present?
subject
end
end
diff --git a/spec/mailers/notify_spec.rb b/spec/mailers/notify_spec.rb
index 88cae0bb756..fae726b965b 100644
--- a/spec/mailers/notify_spec.rb
+++ b/spec/mailers/notify_spec.rb
@@ -24,7 +24,7 @@ describe Notify do
end
it 'has the correct subject' do
- should have_subject /^gitlab \| Account was created for you$/i
+ should have_subject /^Account was created for you$/i
end
it 'contains the new user\'s login name' do
@@ -52,7 +52,7 @@ describe Notify do
end
it 'has the correct subject' do
- should have_subject /^gitlab \| Account was created for you$/i
+ should have_subject /^Account was created for you$/i
end
it 'contains the new user\'s login name' do
@@ -78,7 +78,7 @@ describe Notify do
end
it 'has the correct subject' do
- should have_subject /^gitlab \| SSH key was added to your account$/i
+ should have_subject /^SSH key was added to your account$/i
end
it 'contains the new ssh key title' do