class GitHubStatus::Check

Public Instance Methods

commit() click to toggle source
# File lib/github-status/check.rb, line 21
def commit
  @commit ||= github.branch(repo, branch).commit.sha
end
date(sha) click to toggle source
# File lib/github-status/check.rb, line 16
def date(sha)
  @date ||= github.commit(repo, sha).commit.author.date
end
latest() click to toggle source
# File lib/github-status/check.rb, line 26
def latest
  { 'context@sha' => "concourseci@#{commit}" }
end
sha(version) click to toggle source
# File lib/github-status/check.rb, line 11
def sha(version)
  @sha ||= version.fetch('context@sha') { commit }.split('@').last
end
since(version) click to toggle source
# File lib/github-status/check.rb, line 31
def since(version)
  github
    .commits_since(repo, date(sha(version)))
    .map { |commit| { 'context@sha' => "concourseci@#{commit[:sha]}" } }
end