2021-04-13 08:11:32 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module MergeRequests
|
|
|
|
class ResolveTodosService
|
|
|
|
include BaseServiceUtility
|
|
|
|
|
|
|
|
def initialize(merge_request, user)
|
|
|
|
@merge_request = merge_request
|
|
|
|
@user = user
|
|
|
|
end
|
|
|
|
|
|
|
|
def async_execute
|
2021-05-14 02:10:55 -04:00
|
|
|
MergeRequests::ResolveTodosWorker.perform_async(merge_request.id, user.id)
|
2021-04-13 08:11:32 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
def execute
|
|
|
|
todo_service.resolve_todos_for_target(merge_request, user)
|
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
attr_reader :merge_request, :user
|
|
|
|
end
|
|
|
|
end
|