Commit graph

20 commits

Author SHA1 Message Date
Sean McGivern
a9977f2b7a Syntax-highlight diffs in push emails
Based on:
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/151
2016-05-17 13:23:17 +01:00
Sean McGivern
5f27e26bb4 Only generate repository push email once
The repository push email can be very expensive to generate, especially
with syntax-highlighted diffs. Instead of generating the email for each
recipient, generate one email object and reset the Message-Id and To
headers for each recipient. (Cloning would also be expensive in the case
of large emails, although probably not as bad as generating from
scratch.)
2016-05-11 09:16:01 +01:00
Rémy Coutable
9f218fc184 Improve and finish the fallback to the In-Reply-To and References header for the reply-by-email feature
A few things to note:
- The IncomingEmail feature is now enabled even without a
  correctly-formatted sub-address
- Message-ID for new thread mail are kept the same so that subsequent
  notifications to this thread are grouped in the thread by the email
  service that receives the notification
  (i.e. In-Reply-To of the answer == Message-ID of the first thread message)
- To maximize our chance to be able to retrieve the reply key, we look
  for it in the In-Reply-To header and the References header
- The pattern for the fallback reply message id is "reply-[key]@[gitlab_host]"
- Improve docs thanks to Axil
2016-03-25 13:05:15 +01:00
David Padilla
31e76baf61 Fix #2364. Fall back to In-Reply-To header when reply key not available 2016-03-25 13:05:15 +01:00
Jacob Vosmaer
1764e1b7cb Use Gitlab::Git::DiffCollections 2016-03-03 18:38:44 +01:00
Douwe Maan
1e927d39b4 Update spec 2016-01-07 15:51:12 +01:00
Douwe Maan
50f8366a89 Merge branch 'complexity/rubocop-metrics' into 'master'
Enable rubocop metrics

This enables rubocop metrics like CyclomaticComplexity and ABCSize.
Initial threshold values are high, should be probably decreased.

See merge request !1802
2015-12-11 15:06:31 +00:00
Douwe Maan
13d6bab177 Tag lib specs 2015-12-09 11:55:42 +01:00
Grzegorz Bizon
75c6b29f6b Add RepositoryPush specs 2015-12-08 08:43:09 +01:00
Valery Sizov
8f584d5f2c Fix: Images cannot show when projects' path was changed 2015-10-14 18:50:35 +03:00
Douwe Maan
ee028d9d60 Rename reply_by_email to incoming_email to prepare for the future. 2015-09-21 10:35:37 +02:00
Douwe Maan
15fc7bd613 No HTML-only email please 2015-08-21 16:09:55 -07:00
Douwe Maan
69708dab9f Block blocked users from replying to threads by email. 2015-08-21 10:14:45 -07:00
Douwe Maan
48e25a019a Add stub_reply_by_email_setting helper. 2015-08-20 13:21:22 -07:00
Douwe Maan
6110e175dc Use heredocs. 2015-08-20 13:10:55 -07:00
Douwe Maan
54b04f1c5b Add fixture_file helper. 2015-08-20 12:41:47 -07:00
Douwe Maan
2b5a2b8f39 Removed unused fixtures. 2015-08-20 12:29:03 -07:00
Douwe Maan
8ec5fb138d Test Gitlab::Email::Receiver. 2015-08-20 12:17:59 -07:00
Douwe Maan
991c9f6fda Test Email::AttachmentUploader. 2015-08-20 11:33:35 -07:00
Douwe Maan
e9972efc2f Extract ReplyParser and AttachmentUploader from Receiver. 2015-08-20 11:05:06 -07:00