diff options
author | Douwe Maan <douwe@selenight.nl> | 2016-07-29 05:39:35 +0300 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2016-07-29 05:39:35 +0300 |
commit | fa4a613517a4a236ea5e98a1964e52c8b4eef595 (patch) | |
tree | 5142b38d7dabc9096818dae7b15c45719de98efb /app/controllers | |
parent | 220b82a40c2af56712602c4f9c37163b84c92cac (diff) |
Add 'Resolved all discussions' system note
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/projects/discussions_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/projects/notes_controller.rb | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/app/controllers/projects/discussions_controller.rb b/app/controllers/projects/discussions_controller.rb index 11c8f714a95..86e3f865c6f 100644 --- a/app/controllers/projects/discussions_controller.rb +++ b/app/controllers/projects/discussions_controller.rb @@ -9,6 +9,8 @@ class Projects::DiscussionsController < Projects::ApplicationController discussion.resolve!(current_user) + MergeRequests::AllDiscussionsResolvedService.new(project, current_user).execute(merge_request) + render json: { resolved_by: discussion.resolved_by.try(:name), discussion_headline_html: view_to_html_string('discussions/_headline', discussion: discussion) diff --git a/app/controllers/projects/notes_controller.rb b/app/controllers/projects/notes_controller.rb index 027a2d7dcb2..1849311d26d 100644 --- a/app/controllers/projects/notes_controller.rb +++ b/app/controllers/projects/notes_controller.rb @@ -72,6 +72,8 @@ class Projects::NotesController < Projects::ApplicationController note.resolve!(current_user) + MergeRequests::AllDiscussionsResolvedService.new(project, current_user).execute(note.noteable) + discussion = note.discussion render json: { |