lib/github-status/check.rb in concourse-github-status-0.4.1 vs lib/github-status/check.rb in concourse-github-status-0.4.2
- old
+ new
@@ -6,11 +6,11 @@
class Check < Fuselage::Check
include Core
include Support::GitHub
Contract HashOf[String, String] => String
- def to_sha(version)
+ def sha(version)
@sha ||= version.fetch('context@sha') { commit }.split('@').last
end
Contract None => Time
def date(sha)
@@ -28,10 +28,10 @@
end
Contract HashOf[String, String] => ArrayOf[HashOf[String, String]]
def since(version)
github
- .commits_since(repo, date(to_sha(version)))
+ .commits_since(repo, date(sha(version)))
.map { |commit| { 'context@sha' => "concourseci@#{commit[:sha]}" } }
end
end
end