mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-19 09:36:47 +10:00
Merge pull request #6831 from pkill/better-email-on-push-subject
Provide better email subject lines from email on push service
This commit is contained in:
@@ -37,6 +37,7 @@ v 7.0.0
|
||||
- Remove wall feature (no data loss - you can take it from database)
|
||||
- Dont expose user emails via API unless you are admin
|
||||
- Detect issues closed by Merge Request description
|
||||
- Better email subject lines from email on push service (Alex Elman)
|
||||
|
||||
v 6.9.2
|
||||
- Revert the commit that broke the LDAP user filter
|
||||
|
||||
@@ -25,13 +25,15 @@ module Emails
|
||||
@branch = branch
|
||||
if @commits.length > 1
|
||||
@target_url = project_compare_url(@project, from: @commits.first, to: @commits.last)
|
||||
@subject = "#{@commits.length} new commits pushed to repository"
|
||||
else
|
||||
@target_url = project_commit_url(@project, @commits.first)
|
||||
@subject = @commits.first.title
|
||||
end
|
||||
|
||||
mail(from: sender(author_id),
|
||||
cc: recipient,
|
||||
subject: subject("New push to repository"))
|
||||
subject: subject(@subject))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -537,7 +537,7 @@ describe Notify do
|
||||
end
|
||||
|
||||
it 'has the correct subject' do
|
||||
should have_subject /New push to repository/
|
||||
should have_subject /#{commits.length} new commits pushed to repository/
|
||||
end
|
||||
|
||||
it 'includes commits list' do
|
||||
@@ -573,7 +573,7 @@ describe Notify do
|
||||
end
|
||||
|
||||
it 'has the correct subject' do
|
||||
should have_subject /New push to repository/
|
||||
should have_subject /#{commits.first.title}/
|
||||
end
|
||||
|
||||
it 'includes commits list' do
|
||||
|
||||
Reference in New Issue
Block a user