Commit Graph

36 Commits

Author SHA1 Message Date
Douwe Maan 36bd6c8494 Show who last edited a comment if it wasn't the original author 2015-07-30 14:45:54 +02:00
Robert Speicher b9b2d08638 Dynamically check `:admin_*` ability in IssuableBaseService
Closes #2092
2015-07-24 15:50:12 -04:00
Robert Speicher f3d4767d0c Rename `notice_added_references` to `create_new_cross_references!` 2015-07-13 21:31:16 -04:00
Robert Speicher 8a148793af Simplify Issue and MergeRequest UpdateServices
Now that those pesky task states are gone, these become a lot simpler.
2015-07-08 18:00:42 -04:00
Robert Speicher 0e5fbb29f4 Remove unused `task_[un]check` states from Update services
These were left over from the old Task handling.
2015-07-08 17:56:56 -04:00
Dmitriy Zaporozhets 342d553709
Rename abilities to correspond contoller/model action names
write_ was renamed to create_
modify_  was renamed to update_

So now in update action we have next code

def create
  can?(current_user, :create_issue, @issue)
end

def update
  can?(current_user, :update_issue, @issue)
end

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-26 15:55:56 +02:00
Dmitriy Zaporozhets 0bcfe9a0dc
Dont allow set assignee, milestone or labels if user is guest
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-25 16:17:48 +02:00
Stan Hu d45112258e Fix post-receive errors on a push when an external issue tracker is configured
Closes #1700
Closes #1720
2015-06-12 06:59:27 -07:00
Robert Speicher 1aa3921dd8 Add a note when an Issue or Merge Request's title changes 2015-05-26 21:49:04 -04:00
Robert Speicher 686f6855c2 Update SystemNoteService method naming conventions
Now the verb comes first, and there is no restriction on
singular/plural.
2015-05-11 00:01:15 -04:00
Robert Speicher 48e6fb532a Add a SystemNoteService class
There's a lot of code in the Note model that only deals with creating
system notes, so we're going to split that into its own class.
2015-05-11 00:01:01 -04:00
Dmitriy Zaporozhets dfb4fcb685 No magic numbers for issues filtering 2015-03-26 18:56:42 -07:00
Douwe Maan 515e9d51df Make sure issue assignee is properly reset. 2015-03-24 16:52:02 +01:00
Douwe Maan b673d87227 Send notifications and leave system comments when bulk updating issues. 2015-03-06 15:01:13 +01:00
Stan Hu afe5d7d209 Issue #595: Support Slack notifications upon issue and merge request events
1) Adds a DB migration for all services to toggle on push, issue, and merge events.

2) Upon an issue or merge request event, fire service hooks.

3) Slack service supports custom messages for each of these events. Other services
not supported at the moment.

4) Label merge request hooks with their corresponding actions.
2015-03-03 11:14:31 +01:00
Nikita Verkhovin 8681cb3137 Add labels notes 2015-02-08 22:35:41 +06:00
Dmitriy Zaporozhets 9d85ea3acf Organize event order execution when update issue or mr 2015-01-25 22:49:05 -08:00
Valeriy Sizov 5c6b21f1c2 Merge pull request #7967 from Bugagazavr/issue-actor
Add issueable actor to hooks
2014-11-05 12:10:50 +02:00
Vinnie Okada 85f1e8b84a Remove unused method 2014-10-09 22:33:29 -05:00
Ciro Santilli 23b4a2e721 Factor issue and merge request services 2014-10-07 21:12:18 +02:00
Vinnie Okada 9f0083a96c Add task lists to issues and merge requests
Make the Markdown parser recognize "[x]" or "[ ]" at the beginning of a
list item and turn it into a checkbox input.  Users who can modify the
issue or MR can toggle the checkboxes directly or edit the Markdown to
manage the tasks.  Task status is also displayed in the MR and issue
lists.
2014-10-05 22:15:27 -05:00
Kirill Zaitsev 11848febd1 Add issueable actor 2014-10-05 20:41:33 +04:00
Dmitriy Zaporozhets f0c26bcb64
Fix label set during issue/mr creation
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-07-30 22:48:21 +03:00
Marin Jankovski 1208c6caa8 Notification for reopened issue. 2014-07-03 12:51:24 +02:00
Dmitriy Zaporozhets 8fee5a0572
Make app works with strong params
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-06-26 23:24:17 +03:00
Jeroen van Baarsen 87760a290e Added an UrlBuilder for building rails named routes
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
2014-06-13 12:34:15 +02:00
Jeroen van Baarsen 45e1941fb3 Return a little more information in Issue webhook
When a webhook for issues is triggered, it should also return the
resource URL, and the action that was performed (ie: Was it reopened,
updated, opened or closed)
2014-06-13 12:14:43 +02:00
Dmitriy Zaporozhets f6ee55aabd
Fix issue/mr close/reopen via API
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-06-10 19:23:02 +03:00
Dmitriy Zaporozhets 7edf65d1ee
Make a system comment when issue milestone changed
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-06-10 12:25:43 +03: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 1b5fb4ac21
Fix assignee change in Issues::UpdateService
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-04-02 16:08:49 +03:00
Dmitriy Zaporozhets ed67ba9663
Add support for close/reopen actions in update service
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-04-02 15:50:50 +03:00
Dmitriy Zaporozhets cc77365488
Create services for issue close and reopen
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-04-02 15:38:24 +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
Dmitriy Zaporozhets 1d2bdb4d58
Move all Context classes into Services
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-01-16 19:03:42 +02:00