diff --git a/app/mailers/emails/merge_requests.rb b/app/mailers/emails/merge_requests.rb index e60887d..f0b3aab 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 e58db8e..666cef4 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 # => # # >> 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 88cae0b..fae726b 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 -- libgit2 0.21.2