diff options
author | Bob Van Landuyt <bob@gitlab.com> | 2017-03-08 01:30:43 +0100 |
---|---|---|
committer | Bob Van Landuyt <bob@gitlab.com> | 2017-03-13 08:27:51 +0100 |
commit | 3eeea426387e6959c576adde1978a12bfff59105 (patch) | |
tree | a58c879b991f1023a38dcc9679d0db7e8e79ba0f /app | |
parent | 843092b631ec667aff3cb3617c40a6eef811c097 (diff) | |
download | gitlab-ce-3eeea426387e6959c576adde1978a12bfff59105.tar.gz |
Move `resolve_discussions_with_issue` to `Issues::CreateService`
Diffstat (limited to 'app')
-rw-r--r-- | app/services/issues/create_service.rb | 9 | ||||
-rw-r--r-- | app/services/issues/resolve_discussions.rb | 9 |
2 files changed, 9 insertions, 9 deletions
diff --git a/app/services/issues/create_service.rb b/app/services/issues/create_service.rb index aba590494d6..175312aed91 100644 --- a/app/services/issues/create_service.rb +++ b/app/services/issues/create_service.rb @@ -25,6 +25,15 @@ module Issues resolve_discussions_with_issue(issuable) end + def resolve_discussions_with_issue(issue) + return if discussions_to_resolve.empty? + + Discussions::ResolveService.new(project, current_user, + merge_request: merge_request_for_resolving_discussions, + follow_up_issue: issue). + execute(discussions_to_resolve) + end + private def user_agent_detail_service diff --git a/app/services/issues/resolve_discussions.rb b/app/services/issues/resolve_discussions.rb index 485838e66c4..b7daa3f2916 100644 --- a/app/services/issues/resolve_discussions.rb +++ b/app/services/issues/resolve_discussions.rb @@ -7,15 +7,6 @@ module Issues @discussion_to_resolve_id ||= params.delete(:discussion_to_resolve) end - def resolve_discussions_with_issue(issue) - return if discussions_to_resolve.empty? - - Discussions::ResolveService.new(project, current_user, - merge_request: merge_request_for_resolving_discussions, - follow_up_issue: issue). - execute(discussions_to_resolve) - end - def merge_request_for_resolving_discussions @merge_request_for_resolving_discussions ||= MergeRequestsFinder.new(current_user, project_id: project.id). execute. |