Module: Octokit::ManageGHESClient::ManageAPI

Included in:
Octokit::ManageGHESClient
Defined in:
lib/octokit/manage_ghes_client/manage_ghes.rb

Overview

Methods for the Manage GitHub Enterprise Server API

Instance Method Summary collapse

Instance Method Details

#maintenance_modenil

Get information about the maintenance status of the GHES instance



13
14
15
16
17
# File 'lib/octokit/manage_ghes_client/manage_ghes.rb', line 13

def maintenance_mode
  conn = authenticated_client

  @last_response = conn.get('/manage/v1/maintenance')
end

#set_maintenance_mode(enabled, options = {}) ⇒ nil Also known as: configure_maintenance_mode

Configure the maintenance mode of the GHES instance



23
24
25
26
27
28
# File 'lib/octokit/manage_ghes_client/manage_ghes.rb', line 23

def set_maintenance_mode(enabled, options = {})
  conn = authenticated_client

  options[:enabled] = enabled
  @last_response = conn.post('/manage/v1/maintenance', options)
end