Class: Git::WikiPushService

Inherits:
BaseService show all
Defined in:
app/services/git/wiki_push_service.rb,
app/services/git/wiki_push_service/change.rb

Defined Under Namespace

Classes: Change

Constant Summary collapse

MAX_CHANGES =

Maximum number of change events we will process on any single push

100

Instance Attribute Summary collapse

Attributes inherited from BaseService

#current_user, #params, #project

Instance Method Summary collapse

Methods included from BaseServiceUtility

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

Methods included from Gitlab::Allowable

#can?

Constructor Details

#initialize(wiki, current_user, params) ⇒ WikiPushService

Returns a new instance of WikiPushService.


10
11
12
# File 'app/services/git/wiki_push_service.rb', line 10

def initialize(wiki, current_user, params)
  @wiki, @current_user, @params = wiki, current_user, params.dup
end

Instance Attribute Details

#wikiObject (readonly)

Returns the value of attribute wiki


8
9
10
# File 'app/services/git/wiki_push_service.rb', line 8

def wiki
  @wiki
end

Instance Method Details

#executeObject


14
15
16
17
18
19
# File 'app/services/git/wiki_push_service.rb', line 14

def execute
  # Execute model-specific callbacks
  wiki.after_post_receive

  process_changes
end