Class: GithubCommit::CommitFetcher

Inherits:
Object
  • Object
show all
Defined in:
lib/github_commit/commit_fetcher.rb

Instance Method Summary collapse

Constructor Details

#initialize(repo:, client: Octokit::Client.new) ⇒ CommitFetcher

Returns a new instance of CommitFetcher.



3
4
5
6
# File 'lib/github_commit/commit_fetcher.rb', line 3

def initialize(repo:, client: Octokit::Client.new)
  @client = client
  @repo = repo
end

Instance Method Details

#fetch_commit(sha:) ⇒ Object



8
9
10
# File 'lib/github_commit/commit_fetcher.rb', line 8

def fetch_commit(sha:)
  client.commit(repo, sha)
end

#fetch_status(sha:) ⇒ Object



12
13
14
# File 'lib/github_commit/commit_fetcher.rb', line 12

def fetch_status(sha:)
  client.status(repo, sha)
end