class Everlog::Inf::Api::Github
Public Instance Methods
client()
click to toggle source
# File lib/everlog/inf/api/github.rb, line 5 def client @client ||= Octokit::Client.new(access_token: @config.access_secret) end
commits_on(repo, date)
click to toggle source
# File lib/everlog/inf/api/github.rb, line 15 def commits_on(repo, date) client.commits_on("#{client.user.name}/#{repo}", utc_from_jst(date)) rescue => e raise InfrastructureGithubError, "commits_on error / #{e.message}" end
repos()
click to toggle source
# File lib/everlog/inf/api/github.rb, line 9 def repos client.repositories rescue => e raise InfrastructureGithubError, "repos error / #{e.message}" end
Private Instance Methods
utc_from_jst(date)
click to toggle source
# File lib/everlog/inf/api/github.rb, line 22 def utc_from_jst date DateTime.parse("#{date} 00:00:00 JST").to_time.utc end