debian-mirror-gitlab/app/services/merge_requests/execute_approval_hooks_service.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
415 B
Ruby
Raw Normal View History

2022-08-27 11:52:29 +05:30
# frozen_string_literal: true
module MergeRequests
class ExecuteApprovalHooksService < MergeRequests::BaseService
def execute(merge_request)
# Only one approval is required for a merge request to be approved
notification_service.async.approve_mr(merge_request, current_user)
execute_hooks(merge_request, 'approved')
end
end
end
MergeRequests::ExecuteApprovalHooksService.prepend_mod