Class: MergeRequests::RefreshService

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

Instance Attribute Summary collapse

Attributes inherited from BaseService

#current_user, #params, #project

Instance Method Summary collapse

Methods included from Gitlab::Utils::StrongMemoize

#clear_memoization, #strong_memoize, #strong_memoized?

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 Attribute Details

#pushObject (readonly)

Returns the value of attribute push


6
7
8
# File 'app/services/merge_requests/refresh_service.rb', line 6

def push
  @push
end

Instance Method Details

#execute(oldrev, newrev, ref) ⇒ Object


8
9
10
11
12
13
# File 'app/services/merge_requests/refresh_service.rb', line 8

def execute(oldrev, newrev, ref)
  @push = Gitlab::Git::Push.new(@project, oldrev, newrev, ref)
  return true unless @push.branch_push?

  refresh_merge_requests!
end