Commit Graph
102 Commits
Author SHA1 Message Date
Dmitriy Zaporozhets ee9849b736 Improve mr refresh service tests 2015-01-06 18:05:10 -08:00
Dmitriy Zaporozhets cf95736865 New feature: add 'Mention' notification level
It does disable all emails expect system one or when you was @mentioned

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-12-29 15:55:21 +02:00
Dmitriy Zaporozhets 58011d61c3 Merge branch 'prepare-fork-to-given-namespace' of https://gitlab.com/bkaindl/gitlab-ce into bkaindl/gitlab-ce-prepare-fork-to-given-namespace 2014-11-13 19:36:28 +02:00
Dmitriy Zaporozhets 2139e3519b Refactor merge request refresh logic on push
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-11-11 16:49:26 +02:00
Ciro Santilli c3be1517ae Factor '0' * 40 blank ref constants 2014-11-03 20:37:08 +01:00
Bernhard Kaindl 84fbd29351 transfer_service_spec: cleanup, merge common code, check against nil
- replace creation of group2 with the use of group without add_owner(user)
- fold TransferService calls into new test function transfer_project
  - remove currently not used (and not working) gitlab_shell stub
    (will submit testcase simulating failure in gitlab_shell separately)
- add checks against not be_nil (result.should be_false passes even if nil)
2014-10-04 12:29:24 +02:00
Bernhard Kaindl c44764f523 Prepare ForkService to support forking projects to given namespaces
Remove overload of BaseService.initialize, so initialize gains params,
which is used to pass the namespace (like e.g. in TransferService).

The namespace is checked for permission to create projects in it.
2014-10-03 11:52:29 +02:00
Marin Jankovski ab6459ad48 Add a simple spec test. 2014-09-29 16:07:53 +02:00
Dmitriy Zaporozhets 9ecd3bc6ce Improve git_push service specs
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-09-26 12:55:57 +03:00
Dmitriy Zaporozhets bdbadebe3e Fix adminarea and emails for new membership logic
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-09-15 10:57:02 +03:00
Dmitriy Zaporozhets c69b8e0459 Huge replace of old users_project and users_group references
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-09-14 19:32:51 +03:00
Lukas Erlacher 40fc4261f2 Add system hook for ssh key changes
Add system hook for ssh key create and destroy
Update and fix documentation
Update tests
2014-09-03 01:27:02 +02:00
Job van der Voort 68fd66c6e3 block visibility level restriction override in controller 2014-08-28 20:33:41 +02:00
Dmitriy Zaporozhets c5c906fe64 Fix tests
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-08-27 15:26:35 +03:00
Dmitriy Zaporozhets 2e497d8438 Prevent project stars duplication when fork project
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-08-25 12:19:52 +03:00
Dmitriy Zaporozhets ff5176d45a Fix git_push service specs
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-08-01 15:11:27 +03:00
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