Class: MergeRequests::AfterCreateService

Inherits:
BaseService show all
Defined in:
app/services/merge_requests/after_create_service.rb

Instance Attribute Summary

Attributes inherited from BaseService

#current_user, #params, #project

Instance Method Summary collapse

Methods inherited from BaseService

#cancel_review_app_jobs!, #cleanup_environments, #create_note, #execute_hooks, #hook_data, #inspect, #source_project, #target_project

Methods included from Gitlab::Utils::Override

#extended, extensions, #included, #method_added, #override, #prepended, #queue_verification, verify!

Methods included from AssignsMergeParams

#assign_allowed_merge_params, included

Methods inherited from BaseService

#initialize

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?

Instance Method Details

#execute(merge_request) ⇒ Object


5
6
7
8
9
10
11
12
13
14
# File 'app/services/merge_requests/after_create_service.rb', line 5

def execute(merge_request)
  event_service.open_mr(merge_request, current_user)
  notification_service.new_merge_request(merge_request, current_user)

  create_pipeline_for(merge_request, current_user)
  merge_request.update_head_pipeline

  merge_request.diffs(include_stats: false).write_cache
  merge_request.create_cross_references!(current_user)
end