class Fett::GitHub

Constants

FETT_URL
LOGIN
PASSWORD

Public Class Methods

new_build_status(repository, commit_sha1, status) click to toggle source
# File lib/fett/github.rb, line 11
def self.new_build_status(repository, commit_sha1, status)
  message = GitHubStatusMessageComposer.compose(status)
  client.create_status(repository.fullname, commit_sha1, status, description: message)
end
new_hook(repository) click to toggle source
# File lib/fett/github.rb, line 7
def self.new_hook(repository)
  client.create_hook(repository.fullname, "web", *params)
end

Private Class Methods

client() click to toggle source
# File lib/fett/github.rb, line 18
def self.client
  Octokit::Client.new(login: LOGIN, password: PASSWORD)
end
params() click to toggle source
# File lib/fett/github.rb, line 22
def self.params
  [{
    url: "#{FETT_URL}/builds",
    content_type: "json"
  },
  {
    events: ["push"],
    active: true
  }]
end