Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kazuhiko Shiozaki
gitlab-ce
Commits
94affe6d
Commit
94affe6d
authored
Mar 11, 2015
by
Hannes Rosenögger
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into 'master'
Make email display name configurable #216 See merge request !80
parents
c572bdb5
61ed5187
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
2 deletions
+7
-2
CHANGELOG
CHANGELOG
+2
-0
app/mailers/notify.rb
app/mailers/notify.rb
+1
-1
config/gitlab.yml.example
config/gitlab.yml.example
+1
-0
config/initializers/1_settings.rb
config/initializers/1_settings.rb
+1
-0
spec/mailers/notify_spec.rb
spec/mailers/notify_spec.rb
+2
-1
No files found.
CHANGELOG
View file @
94affe6d
...
...
@@ -47,6 +47,8 @@ v 7.9.0 (unreleased)
- Fix highliht of selected lines in file
- Reject access to group/project avatar if the user doesn't have access.
- Add database migration to clean group duplicates with same path and name (Make sure you have a backup before update)
- Starred projects page at dashboard
- Make email display name configurable
v 7.8.2
- Fix service migration issue when upgrading from versions prior to 7.3
...
...
app/mailers/notify.rb
View file @
94affe6d
...
...
@@ -53,7 +53,7 @@ class Notify < ActionMailer::Base
# The default email address to send emails from
def
default_sender_address
address
=
Mail
::
Address
.
new
(
Gitlab
.
config
.
gitlab
.
email_from
)
address
.
display_name
=
"GitLab"
address
.
display_name
=
Gitlab
.
config
.
gitlab
.
email_display_name
address
end
...
...
config/gitlab.yml.example
View file @
94affe6d
...
...
@@ -43,6 +43,7 @@ production: &base
# email_enabled: true
# Email address used in the "From" field in mails sent by GitLab
email_from: example@example.com
email_display_name: GitLab
# Email server smtp settings are in config/initializers/smtp_settings.rb.sample
...
...
config/initializers/1_settings.rb
View file @
94affe6d
...
...
@@ -102,6 +102,7 @@ Settings.gitlab['relative_url_root'] ||= ENV['RAILS_RELATIVE_URL_ROOT'] || ''
Settings
.
gitlab
[
'protocol'
]
||=
Settings
.
gitlab
.
https
?
"https"
:
"http"
Settings
.
gitlab
[
'email_enabled'
]
||=
true
if
Settings
.
gitlab
[
'email_enabled'
].
nil?
Settings
.
gitlab
[
'email_from'
]
||=
"gitlab@
#{
Settings
.
gitlab
.
host
}
"
Settings
.
gitlab
[
'email_display_name'
]
||=
"GitLab"
Settings
.
gitlab
[
'url'
]
||=
Settings
.
send
(
:build_gitlab_url
)
Settings
.
gitlab
[
'user'
]
||=
'git'
Settings
.
gitlab
[
'user_home'
]
||=
begin
...
...
spec/mailers/notify_spec.rb
View file @
94affe6d
...
...
@@ -5,6 +5,7 @@ describe Notify do
include
EmailSpec
::
Matchers
include
RepoHelpers
let
(
:gitlab_sender_display_name
)
{
Gitlab
.
config
.
gitlab
.
email_display_name
}
let
(
:gitlab_sender
)
{
Gitlab
.
config
.
gitlab
.
email_from
}
let
(
:recipient
)
{
create
(
:user
,
email:
'recipient@example.com'
)
}
let
(
:project
)
{
create
(
:project
)
}
...
...
@@ -23,7 +24,7 @@ describe Notify do
shared_examples
'an email sent from GitLab'
do
it
'is sent from GitLab'
do
sender
=
subject
.
header
[
:from
].
addrs
[
0
]
expect
(
sender
.
display_name
).
to
eq
(
'GitLab'
)
expect
(
sender
.
display_name
).
to
eq
(
gitlab_sender_display_name
)
expect
(
sender
.
address
).
to
eq
(
gitlab_sender
)
end
end
...
...
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