123456789_123456789_123456789_123456789_123456789_

Module: Octokit::ManageGHESClient::ManageAPI

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Included In:
Defined in: lib/octokit/manage_ghes_client/manage_ghes.rb

Overview

Methods for the Manage GitHub Enterprise Server API

Instance Method Summary

Instance Method Details

#configure_maintenance_mode(enabled, options = {})

[ GitHub ]

  
# File 'lib/octokit/manage_ghes_client/manage_ghes.rb', line 29

alias configure_maintenance_mode set_maintenance_mode

#maintenance_modenil

Get information about the maintenance status of the GHES instance

[ GitHub ]

  
# 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

Parameters:

  • maintenance (Hash)

    A hash configuration of the maintenance mode status

[ GitHub ]

  
# 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