class Stax::Github

Public Class Methods

exists?() click to toggle source

check if this sha exists in github

# File lib/stax/github.rb, line 17
def self.exists?
  !octokit.commit(Git.repo, Git.sha).nil?
rescue Octokit::NotFound
  false
end
octokit() click to toggle source
# File lib/stax/github.rb, line 7
def self.octokit
  abort('Please set GITHUB_TOKEN') unless ENV['GITHUB_TOKEN']
  @_octokit ||= Octokit::Client.new(access_token: ENV['GITHUB_TOKEN'])
end
tags() click to toggle source
# File lib/stax/github.rb, line 12
def self.tags
  @_tags ||= octokit.tags(Git.repo)
end