提交 d8a24003 编写于 作者: P Pierre de La Morinerie

Don't write the project namespace in email subjects

For instance, the email "Subject" field changes from:

    Mattt / Ground Control | Saving issue doesn't work sometimes (#1234)

to:

    Ground Control | Saving issue doesn't work sometimes (#1234)

Rationale:

* Most people are receiving email notifications about a single fork:
the project activity, issues and merge requests are happening either
in a root repository or in a fork, but less often in several forks.

* It removes noise from the email subject. The namespace of the project
can still be read in the email body.

* For Entreprise users that have a single namespace "MyEntreprise",
having this repeated in every email subject is very noisy.
上级 44ab156e
......@@ -56,7 +56,7 @@ class Notify < ActionMailer::Base
# => "Lorem ipsum | Dolor sit amet"
def subject(*extra)
subject = ""
subject << "#{@project.name_with_namespace} | " if @project
subject << "#{@project.name} | " if @project
subject << extra.join(' | ') if extra.present?
subject
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册