Commit Graph
86 Commits
Author SHA1 Message Date
Marin Jankovski 16068f3bfe Test if reopen notifications are sent. 2014-07-03 14:05:07 +02:00
Marin Jankovski 8a365f5d56 Fix tests because previous assignee didn't exist. 2014-07-02 13:32:53 +02:00
Dmitriy Zaporozhets 8fb76a8308 Merge branch 'group_milestones' into 'master'
Group milestones
2014-07-01 07:18:15 +00:00
Dmitriy Zaporozhets 4967c08786 Fix signup and project visibility
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-06-30 16:43:32 +03:00
Marin Jankovski eb5182ac8d Add group service spec. 2014-06-30 15:00:12 +02:00
Dmitriy Zaporozhets f0de4b539f Fix project update specs
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-06-27 00:28:32 +03:00
Marin Jankovski 8f0051e2c2 Test @all mentioning notifications. 2014-06-23 14:02:09 +02:00
Dmitriy Zaporozhets d12b910d20 Merge branch 'remove-observers' into 'master'
Remove observers from application

Part of #1133
2014-06-23 06:36:08 +00: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
Dmitriy Zaporozhets 9ef5898e67 Fix search tests
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-06-18 12:53:29 +03:00
Dmitriy Zaporozhets 73f91da8b1 Fix project deletion and tests 2014-06-17 23:49:17 +03:00
Dmitriy Zaporozhets 2d87556847 Remove rails observers from application 2014-06-17 22:51:43 +03:00
Dmitriy Zaporozhets 6149dba518 Remove NotesObserver 2014-06-17 22:09:01 +03:00
Dmitriy Zaporozhets d593c98fcb Delete wall notes tests
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-06-13 14:29:26 +03: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 14f78d067d Modify specs for new project transfer code
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-05-28 19:04:18 +03:00
Marin Jankovski 43e7b8fa07 Remove empty space 2014-05-26 15:55:41 +02:00
Marin Jankovski f8a6d3405e Add image_service spec. 2014-05-26 15:47:54 +02:00
Alex 31b0e14981 Adding project visibility to system hooks 2014-05-12 10:23:24 +01:00
Dmitriy Zaporozhets 1bd28994cc Use ProjectWiki instead of GollumWiki in code
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-04-09 14:35:58 +03:00
Dmitriy Zaporozhets 860f159d41 Add note when MR assignee changes. Add more tests to MR services
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-04-03 18:16:05 +03:00
Dmitriy Zaporozhets 9b6224f99c More test fixes
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-04-03 12:05:21 +03:00
Dmitriy Zaporozhets 3faa14e7a7 Merge branch 'reduce-observers' into 'master'
Move issue create/update code to services

Reduce observers role in GitLab code
2014-04-02 17:54:27 +00:00
Dmitriy Zaporozhets 49f977d675 Fix tests
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-04-02 19:55:23 +03:00
Dmitriy Zaporozhets 928fbeeec0 More tests for Isses services
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-04-02 16:33:07 +03:00
Dmitriy Zaporozhets c4e81ed9de Move update issue code to separate service
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-04-02 13:54:41 +03:00
Dmitriy Zaporozhets cfd9fd30d6 Move code for issue creation to service.
The goal of suych refactoring is to get rid of observers.
Its much easier to test and code when object creation and all other
related actions done in one class instead of splited across observers,
callbacks etc.

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-04-02 13:38:35 +03:00
Marin Jankovski f4f0a7e03e Add a failing test. 2014-04-01 17:18:52 +02:00
Dmitriy Zaporozhets d89130b097 Collect all event creation logic in one place called EventCreateService
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-03-25 14:48:02 +02:00
Dmitriy Zaporozhets 72b13cc1be Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce 2014-03-25 09:04:22 +02:00
Dmitriy Zaporozhets 3d8ecbc94f Merge branch 'no-emails-for-mentions' into 'master'
Don't send an email for "mentioned in" notes

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", the 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 added to an existing mentionable. In most cases the email notification sent by the mentioner is enough.
2014-03-24 18:52:41 +00: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
Robert Speicher 07833d1676 Move Project's service specs to the correct location
[ci skip]
2014-03-22 16:38:22 -04:00
Robert Speicher 1897fb00b8 Make use of project factory traits 2014-03-19 05:15:24 -04:00
Dmitriy Zaporozhets ac6b9fafdc Fix specs
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-03-14 12:53:05 +02:00
Jeroen van Baarsen e6ceec9d60 Renamed oldrev/newrev to before/after 2014-03-06 16:15:19 +01:00
Jeroen van Baarsen 4a251849cf Added newrev and oldrev to the hook data 2014-03-06 16:08:51 +01:00
Jeroen van Baarsen 13d2bcc3b4 Created a basic Git Tag Push service
This is the first version, and only has the most basic information about
the tag that is created.
2014-03-05 21:23:49 +01:00
Dmitriy Zaporozhets 345b3d4b72 Update tests and fix Finders readme
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-02-25 19:21:53 +02:00
Dmitriy Zaporozhets c3a3f80af9 Merge branch 'cleaner-email-headers' into 'master'
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 &lt;gitlab@gitlab.com&gt;
> 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).
2014-02-25 13:34:06 +00:00
Dmitriy Zaporozhets 75eed4eb83 Implement project collection service
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>
2014-02-25 14:36:36 +02:00
Pierre de La Morinerie 5818cf063b Don't send an email for "mentioned in" notes
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.
2014-02-24 15:34:56 +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
Jason Hollingsworth 29cfd33d94 Add email aliases for users
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.
2014-02-13 22:59:39 -06:00
Dmitriy Zaporozhets ec437ad999 Add more tests for FilteringService
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-02-10 15:23:19 +02:00
Dmitriy Zaporozhets c227aa44f9 Make changes to tests
* project_with_code -> project
* project -> ermpty_project

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-01-22 21:03:52 +02:00
Dmitriy Zaporozhets 4a1654ed6a Replace context with service in specs
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-01-16 20:29:18 +02:00
Dmitriy Zaporozhets e3f436dc43 Merge branch 'refactoring/issues_filter' into 'master'
Refactoring: Issues/MR filtering logic

Move all issues, mr filtering logic into FilteringService
2014-01-16 10:21:21 +00:00
Dmitriy Zaporozhets 4e96b1759c Merge branch 'refactoring/services' of /home/git/repositories/gitlab/gitlabhq 2014-01-15 18:43:30 +00:00
Dmitriy Zaporozhets 4a5e4b18f5 Specs for FilteringService
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-01-15 16:32:07 +02:00