Move resolve_discussions_with_issue
to Issues::CreateService
This commit is contained in:
parent
843092b631
commit
3eeea42638
2 changed files with 9 additions and 9 deletions
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue