class Lita::Handlers::CircleciCommander::CircleCi

Public Instance Methods

project() click to toggle source
# File lib/lita/handlers/circleci_commander.rb, line 37
def project
  ENV["CIRCLECI_PROJECT"]
end
rebuild(id) click to toggle source
# File lib/lita/handlers/circleci_commander.rb, line 24
def rebuild id
  uri = URI("https://circleci.com/api/v1.1/project/#{vcs}/#{username}/#{project}/#{id}/retry?circle-token=#{token}")
  Net::HTTP.post_form(uri, {}).is_a?(Net::HTTPSuccess)
end
token() click to toggle source
# File lib/lita/handlers/circleci_commander.rb, line 41
def token
  ENV["CIRCLECI_TOKEN"]
end
username() click to toggle source
# File lib/lita/handlers/circleci_commander.rb, line 33
def username
  ENV["CIRCLECI_USERNAME"]
end
vcs() click to toggle source
# File lib/lita/handlers/circleci_commander.rb, line 29
def vcs
  ENV["CIRCLECI_VCS_TYPE"]
end