Sha256: 9e0a8faf974164d4e7ed8fa799765ffb354e90e6a1b8bbe4d5d9da4d37519821

Contents?: true

Size: 378 Bytes

Versions: 2

Compression:

Stored size: 378 Bytes

Contents

require "octokit"

module TerraspaceCiGithub
  class Base
    extend Memoist

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

    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
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
terraspace_ci_github-0.1.1 lib/terraspace_ci_github/base.rb
terraspace_ci_github-0.1.0 lib/terraspace_ci_github/base.rb