Module: Octokit::Client::Statuses
- Included in:
- Octokit::Client
- Defined in:
- lib/octokit/client/statuses.rb
Instance Method Summary collapse
-
#create_status(repo, sha, state, options = {}) ⇒ Hash
Create status for a commit.
-
#statuses(repo, sha, options = {}) ⇒ Array
(also: #list_statuses)
List all statuses for a given commit.
Instance Method Details
#create_status(repo, sha, state, options = {}) ⇒ Hash
Create status for a commit
23 24 25 26 |
# File 'lib/octokit/client/statuses.rb', line 23 def create_status(repo, sha, state, ={}) .merge!(:state => state) post("repos/#{Repository.new(repo)}/statuses/#{sha}", ) end |
#statuses(repo, sha, options = {}) ⇒ Array Also known as: list_statuses
List all statuses for a given commit
11 12 13 |
# File 'lib/octokit/client/statuses.rb', line 11 def statuses(repo, sha, ={}) get("repos/#{Repository.new(repo)}/statuses/#{sha}", ) end |