Class: Stalkerr::Target::GithubEnterprise

Inherits:
Github
  • Object
show all
Defined in:
lib/stalkerr/target/github_enterprise.rb

Instance Method Summary collapse

Methods inherited from Github

#initialize, #parse, #posts, #shorten, #stalking

Constructor Details

This class inherits a constructor from Stalkerr::Target::Github

Instance Method Details

#channelObject



7
8
9
# File 'lib/stalkerr/target/github_enterprise.rb', line 7

def channel
  ENV['GITHUB_ENTERPRISE_CHANNEL'] || '#github_enterprise'
end

#clientObject



11
12
13
14
15
16
17
18
19
20
# File 'lib/stalkerr/target/github_enterprise.rb', line 11

def client
  if !@client || @client && !@client.token_authenticated?
    @client = Octokit::Client.new(
      access_token: @password,
      api_endpoint: _api_endpoint,
      web_endpoint: _web_endpoint
    )
  end
  @client
end