Commit 3eeea426 authored by Bob Van Landuyt's avatar Bob Van Landuyt

Move `resolve_discussions_with_issue` to `Issues::CreateService`

parent 843092b6
...@@ -25,6 +25,15 @@ module Issues ...@@ -25,6 +25,15 @@ module Issues
resolve_discussions_with_issue(issuable) resolve_discussions_with_issue(issuable)
end 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 private
def user_agent_detail_service def user_agent_detail_service
......
...@@ -7,15 +7,6 @@ module Issues ...@@ -7,15 +7,6 @@ module Issues
@discussion_to_resolve_id ||= params.delete(:discussion_to_resolve) @discussion_to_resolve_id ||= params.delete(:discussion_to_resolve)
end 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 def merge_request_for_resolving_discussions
@merge_request_for_resolving_discussions ||= MergeRequestsFinder.new(current_user, project_id: project.id). @merge_request_for_resolving_discussions ||= MergeRequestsFinder.new(current_user, project_id: project.id).
execute. execute.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment