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
13
14
# File 'app/services/git/wiki_push_service.rb', line 10

def initialize(wiki, current_user, params)
  @wiki = wiki
  @current_user = current_user
  @params = 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



16
17
18
19
20
21
22
# File 'app/services/git/wiki_push_service.rb', line 16

def execute
  # Execute model-specific callbacks
  wiki.after_post_receive

  process_changes
  perform_housekeeping
end