Class: TerraspaceCiGithub::Base

Inherits:
Object
  • Object
show all
Extended by:
Memoist
Defined in:
lib/terraspace_ci_github/base.rb

Direct Known Subclasses

Pr, Vars

Instance Method Summary collapse

Instance Method Details

#clientObject



9
10
11
# File 'lib/terraspace_ci_github/base.rb', line 9

def client
  Octokit::Client.new(access_token: ENV['GH_TOKEN'])
end

#github_token?Boolean

Returns:

  • (Boolean)


14
15
16
17
18
19
20
21
# File 'lib/terraspace_ci_github/base.rb', line 14

def github_token?
  if ENV['GH_TOKEN']
    true
  else
    puts "WARN: The env var GH_TOKEN is not configured. Will not post PR comment"
    false
  end
end