Class: MergeRequests::ResolveTodosService

Inherits:
Object
  • Object
show all
Includes:
BaseServiceUtility
Defined in:
app/services/merge_requests/resolve_todos_service.rb

Instance Method Summary collapse

Methods included from BaseServiceUtility

#deny_visibility_level, #event_service, #log_error, #log_info, #notification_service, #system_hook_service, #todo_service, #visibility_level

Methods included from Gitlab::Allowable

#can?

Constructor Details

#initialize(merge_request, user) ⇒ ResolveTodosService

Returns a new instance of ResolveTodosService.


7
8
9
10
# File 'app/services/merge_requests/resolve_todos_service.rb', line 7

def initialize(merge_request, user)
  @merge_request = merge_request
  @user = user
end

Instance Method Details

#async_executeObject


12
13
14
# File 'app/services/merge_requests/resolve_todos_service.rb', line 12

def async_execute
  MergeRequests::ResolveTodosWorker.perform_async(merge_request.id, user.id)
end

#executeObject


16
17
18
# File 'app/services/merge_requests/resolve_todos_service.rb', line 16

def execute
  todo_service.resolve_todos_for_target(merge_request, user)
end