Commit Graph

27 Commits

Author SHA1 Message Date
Pierre de La Morinerie 32a6f41f1c Include "Merge-request reopened" emails in the proper email thread 2014-07-25 10:50:58 +02:00
Dmitriy Zaporozhets 664112b47e Merge branch 'improve-email-threading' into 'master'
Improve email threading

This is a follow-up to !112 : it improves email threading, without changing the receiver of the emails.

* Subject of answers to an existing thread begins with `Re: ` (required by Mail.app)
* Send a 'In-Reply-To' header along the 'References' header
2014-07-07 14:06:40 +00:00
Pierre de La Morinerie 6dafbf2412 Allow more mail clients to group emails by thread
* send a 'In-Reply-To' header along the 'References' header
* subject of answers to an existing thread begins with 'Re: '
2014-07-03 16:58:42 +02:00
Marin Jankovski 16068f3bfe Test if reopen notifications are sent. 2014-07-03 14:05:07 +02:00
Marin Jankovski 310231dbed Reopen mr email notification. 2014-07-03 13:40:21 +02:00
Jacob Vosmaer 780d868fec Revert "Merge branch 'fix-email-threading' into 'master'"
This reverts commit 97fd990ecd, reversing
changes made to f451a697e0.

Conflicts:
	app/mailers/emails/notes.rb
	app/mailers/emails/projects.rb
2014-06-18 13:41:12 +02:00
Pierre de La Morinerie de90b572d8 Allow more mail clients to group emails by thread
* send a ‘In-Reply-To’ header along the ‘References’ header
* subject of answers to an existing thread begins with ‘Re: ’

This fixes threading with at least Mail.app and Airmail.
2014-06-10 17:09:15 +02:00
Pierre de La Morinerie 466b768bb3 Send notification emails to the "project", and put people in Cc
This fixes email threading in Mail.app, that doesn't like when a thread
doesn't have stable recipients.

For instance, here is a possible sender-recipient combinations before:

From: A
To: Me
New issue

From: B
To: Me
Reply on new issue

From: A
To: Me
Another reply

Mail.app doesn't see B as a participant to the original email thread,
and decides to break the thread: it will group all messages from A
together, and separately all messages from B.

This commit makes the thread look like this:

From: A
To: gitlab/project
Cc: Me
New issue

From: B
To: gitlab/project
Cc: Me
Reply on new issue

From: A
To: gitlab/project
Cc: Me
Another reply

Mail.app sees a common recipient, and group the thread correctly.
2014-06-10 17:09:15 +02:00
Dmitriy Zaporozhets 17858d49f6 Merge pull request #6109 from jamit/master
Added email threading for update emails on issues and merge requests
2014-05-13 12:35:33 +03:00
Philip Blatter 06bed543e6 Added email threading for update emails on issues and merge requests (if the mail client support the References: mail header) 2014-05-05 21:46:51 +02:00
Drew Blessing 17b3da07ce Remove markdown notation from notification emails 2014-04-28 14:33:17 -05:00
Pierre de La Morinerie 65f5496e02 Fix the merge notification email not being sent
The 'author_id_of_changes' attribute is not persisted in the database.
As we retrieve the merge request from the DB just before sending the
email, this attribute was always nil.

Also there was no tests for the merge notification code - tests have
been added.

Fix #6605
2014-03-24 15:11:35 +01:00
Pierre de La Morinerie 7ba0b502d3 Add a "View in GitLab" link in notification emails
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.
2014-03-03 16:58:44 +01:00
Pierre de La Morinerie 96dded3ec8 Send emails from the author
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.
2014-02-19 18:25:18 +01:00
Pierre de La Morinerie 57cb1ca791 Write the issue/merge request title in the notification email subject
This changes the email subjects for issues and merge request
notifications from:

    Team / Project | Note for issue #1234

to:

    Team / Project | Saving issue doesn't work sometimes (#1234)

Rationale:

* Scan the subject of the email notification more easily when catching
up with a lot of notifications. Instead of having to open the email to
get the title of the issue or merge request, one can simply read the
subject of the email.

* Group messages by subject: email clients will group emails in threads
if they have the same subject.
2014-02-19 18:25:18 +01:00
Pierre de La Morinerie 44ab156ef4 Remove the email subject prefix
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.
2014-02-19 18:25:18 +01:00
skv a3f645ef51 Remove deprecated finders 2014-01-19 23:39:56 +04:00
Dmitriy Zaporozhets 0429740af6
Add @project variable to merge request emails
After this change project name appears in the top part of email when you
open/close/accept merge request.

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2013-12-16 19:56:47 +02:00
Drew Blessing 57ad81a9c5 Fix minor errors/annoyances in email templates
There was some funny syntax in merge request email templates. There was a ! before
the merge request number when there probably should be a #. This may be some carry over
from markdown but should not be in email templates.  There were also some capitalization
discrepancies among the subject lines. For those OCD people out there I standardized the
capitalization. :)
2013-11-08 10:20:15 -06:00
Dmitriy Zaporozhets 0fcd89e3ac Show iids for issues/mr in email subject 2013-08-22 15:40:48 +03:00
Izaak Alpert 539c70c7d6 Update emails to describe path using for_fork?
Forked MR's will print

Project:Branch <source_project_with_path>:<source_branch> -> <target_project_with_path>:<target_branch>

Non forked MR's will print

Branch <source_branch> -> <target_branch>

Change-Id: I89399aec2e7fde8e4b64b110a48099a95ae4f038
2013-07-17 22:48:03 -04:00
Izaak Alpert d99594273d Style changes from review with @randx
-Some changes around calling origional methods for !for_fork? merge requests. Other changes to follow

Change-Id: I009c716ce2475b9efa3fd07aee9215fca7a1c150
2013-07-17 22:48:03 -04:00
Izaak Alpert 3d7194f011 Merge Request on forked projects
The good:

 - You can do a merge request for a forked commit and it will merge properly (i.e. it does work).
 - Push events take into account merge requests on forked projects
 - Tests around merge_actions now present, spinach, and other rspec tests
 - Satellites now clean themselves up rather then recreate

The questionable:

 - Events only know about target projects
 - Project's merge requests only hold on to MR's where they are the target
 - All operations performed in the satellite

The bad:

  -  Duplication between project's repositories and satellites (e.g. commits_between)

(for reference: http://feedback.gitlab.com/forums/176466-general/suggestions/3456722-merge-requests-between-projects-repos)

Fixes:

Make test repos/satellites only create when needed
-Spinach/Rspec now only initialize test directory, and setup stubs (things that are relatively cheap)
-project_with_code, source_project_with_code, and target_project_with_code now create/destroy their repos individually
-fixed remote removal
-How to merge renders properly
-Update emails to show project/branches
-Edit MR doesn't set target branch
-Fix some failures on editing/creating merge requests, added a test
-Added back a test around merge request observer
-Clean up project_transfer_spec, Remove duplicate enable/disable observers
-Ensure satellite lock files are cleaned up, Attempted to add some testing around these as well
-Signifant speed ups for tests
-Update formatting ordering in notes_on_merge_requests
-Remove wiki schema update
Fixes for search/search results
-Search results was using by_project for a list of projects, updated this to use in_projects
-updated search results to reference the correct (target) project
-udpated search results to print both sides of the merge request

Change-Id: I19407990a0950945cc95d62089cbcc6262dab1a8
2013-07-17 22:41:30 -04:00
Dmitriy Zaporozhets f49fb5dca1 Fix error when reassign issue/merge_request from non-assigned. Fixes #3201 2013-07-01 19:01:19 +03:00
Dmitriy Zaporozhets 2f585840db Fixed new mr/issue emails 2013-03-28 12:52:44 +02:00
Dmitriy Zaporozhets f49a2ac0df Add close issue/mr methods to Notify. Refactored Notificationservice 2013-03-28 12:14:53 +02:00
Dmitriy Zaporozhets a3cdaeef66 refactor emails a bit. Add email on ssh key creation 2013-03-19 20:00:41 +02:00