BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
f31f101d
Commit
f31f101d
authored
Jun 16, 2014
by
Sytse Sijbrandij
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6831 from pkill/better-email-on-push-subject
Provide better email subject lines from email on push service
parents
46e33ed3
e6722cb1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
3 deletions
+6
-3
CHANGELOG
CHANGELOG
+1
-0
projects.rb
app/mailers/emails/projects.rb
+3
-1
notify_spec.rb
spec/mailers/notify_spec.rb
+2
-2
No files found.
CHANGELOG
View file @
f31f101d
...
...
@@ -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
...
...
app/mailers/emails/projects.rb
View file @
f31f101d
...
...
@@ -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
spec/mailers/notify_spec.rb
View file @
f31f101d
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment