diff options
author | Pierre de La Morinerie <pierre@capitainetrain.com> | 2014-02-17 16:45:28 +0100 |
---|---|---|
committer | Pierre de La Morinerie <pierre@capitainetrain.com> | 2014-02-19 18:25:18 +0100 |
commit | 44ab156ef45fb1a566395b4d98afe796b28d21c9 (patch) | |
tree | 3fdc4c636304a2de80f0a49b8324fbd8ebbdcceb /app/mailers | |
parent | 49cb1c7277d4b26cba8f28745ca9b9e348c72a50 (diff) | |
download | gitlab-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.
Diffstat (limited to 'app/mailers')
-rw-r--r-- | app/mailers/emails/merge_requests.rb | 2 | ||||
-rw-r--r-- | app/mailers/notify.rb | 12 |
2 files changed, 7 insertions, 7 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 |