Class: Everlog::Inf::Api::Github
Instance Method Summary
collapse
#initialize
Instance Method Details
#client ⇒ Object
5
6
7
|
# 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) ⇒ Object
15
16
17
18
19
|
# 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 ⇒ Object
9
10
11
12
13
|
# File 'lib/everlog/inf/api/github.rb', line 9
def repos
client.repositories
rescue => e
raise InfrastructureGithubError, "repos error / #{e.message}"
end
|