When an email notification concerns a specific object (issue, note,
merge request, etc.), add a link to the footer of the email that opens
the item's page in a web browser.
Rationale:
* The link is predictable: always the same text, always at the same
location, like any reliable tool.
* It allows to remove the inline-title in many emails, and leave only
the actual content of the message.
Cleaner headers in Notification Emails
Make the informations available in the notification email headers (sender, recipient, subject, etc.) more readable and meaningful.
* Remove the email subject prefix
* Don't write the project namespace in email subjects
* Write the issue/merge request title in the notification email subject
* Make the email appear as sent from the action author (the actual email address is still `gitlab@gitlab.com`)
For instance, this is the notification email for a new issue comment before:
> From: gitlab@gitlab.com
> To: myemailaddress@gmail.com
> Subject: GitLab | GitLab HQ / GitLab-Shell | New note for issue #1234
And after :
> From: Nick Brown <gitlab@gitlab.com>
> To: myemailaddress@gmail.com
> Subject: GitLab-Shell | Add local update hook (#1234)
The recipient of the notification can easily get the gist of the message without even opening it — just by looking at how it appears in her inbox. None of the actual email addresses (From, To, Reply-to) changes, just the display name.
Having a consistent subject for all notification emails sent about some resource also allow good email clients to group the discussion by thread (although grouping in Mail.app still needs some work).
Main purpose is move big amount of methods from user, group, project
models and place filtering logic in one place.
It also fixes 500 error on group page for PostgreSQL
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Public Groups
This is the initial work (meaning no tests) for making groups public if they have a public project (or internal for logged in users). This allows issues and merge requests to be viewed, but _not_ group membership. As part of this I have also added back the link in the public project title section (it was removed as it didn't make sense before).
This addesses the following suggestions/issues:
http://feedback.gitlab.com/forums/176466-general/suggestions/5314461-groups-containing-one-or-more-public-projects-shou
Issue #32https://github.com/gitlabhq/gitlabhq/issues/5203
as well as a few closed issues.
This also changes the public user page to only show groups that are accessible to the user in some manner.
Currently, an email is sent every time a mentionable is referenced
by an issue, a commit or a merge request: if I comment "This MR is
related to #5", watchers get one email for the comment, and another
one stating "Issue #5 was mentioned by issue #13".
This is annoying — but the biggest issue is when pushing an existing
branch. Every issue referenced by commit messages in this branch will
get a new mention (which is fine), and dozens of emails will be sent
for all these new mentions (which is not).
This commit fixes the spam by avoiding to send an email when a new
mention is created. In most cases the email notification for the
mentioner is enough.
This changes the email "From" field from "gitlab@example.com" to either:
* "John Doe <gitlab@example.com>" if the author of the action is known,
* "GitLab <gitlab@example.com>" otherwise.
Rationale: this allow mails to appear as if they were sent by the
author. It appears in the mailbox more like a real discussion between
the sender and the receiver ("John sent: we should refactor this") and
less like a robot notifying about something.
This changes email subjects from:
GitLab | Team / Project | Note for issue #1234
to:
Team / Project | Note for issue #1234
Rationale:
* Emails should be as meaningful as possible, and emphasize content over
chrome. The "GitLab" name is more chrome than content.
* Users can tell an email coming from GitLab by the sender or the header
in the email content.
* An organization that works mainly with GitLab knows that
every SVC email comes from GitLab. For these organizations, having
"GitLab" in front of every email is just noise hiding the meaningful
information.
Emails are used to associate commits with users. The emails
are not verified and don't have to be valid email addresses. They
are assigned on a first come, first serve basis.
Notifications are sent when an email is added.
It should not set noteable_id if noteable_type is Commit
We have Note#commit_id for this
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>