Class: MergeRequests::MergeBaseService

Inherits:
BaseService show all
Includes:
Gitlab::Utils::StrongMemoize
Defined in:
app/services/merge_requests/merge_base_service.rb

Direct Known Subclasses

MergeService, MergeToRefService

Constant Summary collapse

MergeError =
Class.new(StandardError)

Instance Attribute Summary collapse

Attributes inherited from BaseContainerService

#container, #current_user, #group, #params, #project

Instance Method Summary collapse

Methods inherited from BaseService

#cancel_review_app_jobs!, #cleanup_environments, #create_note, #deactivate_pages_deployments, #execute_external_hooks, #execute_group_mention_hooks, #execute_hooks, #handle_assignees_change, #handle_changes, #handle_reviewers_change, #hook_data, #initialize, #inspect, #merge_request_activity_counter, #source_project, #target_project

Methods included from Gitlab::Utils::Override

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

Methods included from ErrorLogger

#log_error

Methods included from AssignsMergeParams

#assign_allowed_merge_params, included

Methods inherited from BaseContainerService

#group_container?, #initialize, #namespace_container?, #project_container?, #project_group, #root_ancestor

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?, #can_all?, #can_any?

Constructor Details

This class inherits a constructor from MergeRequests::BaseService

Instance Attribute Details

#merge_requestObject (readonly)

Returns the value of attribute merge_request.



9
10
11
# File 'app/services/merge_requests/merge_base_service.rb', line 9

def merge_request
  @merge_request
end

Instance Method Details

#hooks_validation_error(merge_request, validate_squash_message: false) ⇒ Object

Overridden in EE.



17
18
19
# File 'app/services/merge_requests/merge_base_service.rb', line 17

def hooks_validation_error(merge_request, validate_squash_message: false)
  # No-op
end

#hooks_validation_pass?(merge_request, validate_squash_message: false) ⇒ Boolean

Overridden in EE.

Returns:

  • (Boolean)


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

def hooks_validation_pass?(merge_request, validate_squash_message: false)
  true
end