Sha256: 1ca222d54efd7bddde4ca002ecd6de37d6ca65d02a2756e14ebaf82d11fd0e21
Contents?: true
Size: 486 Bytes
Versions: 6
Compression:
Stored size: 486 Bytes
Contents
require 'contracts' require 'octokit' module GitHubStatus module Support module GitHub include ::Contracts::Core include ::Contracts::Builtin include Source Contract None => Octokit::Client def github @github ||= Octokit::Client.new access_token: access_token end Contract None => String def canonical_sha @canonical_sha ||= (sha.match(/^.{40}$/) || github.commit(repo, sha).sha).to_s end end end end
Version data entries
6 entries across 6 versions & 1 rubygems