Module: Octokit::Client::Statuses
- Included in:
- Octokit::Client
- Defined in:
- lib/octokit/client/statuses.rb
Overview
Methods for the Commit Statuses API
Constant Summary collapse
- COMBINED_STATUS_MEDIA_TYPE =
"application/vnd.github.she-hulk-preview+json"
Instance Method Summary collapse
-
#combined_status(repo, ref, options = {}) ⇒ Sawyer::Resource
(also: #status)
Get the combined status for a ref.
-
#create_status(repo, sha, state, options = {}) ⇒ Sawyer::Resource
Create status for a commit.
-
#statuses(repo, sha, options = {}) ⇒ Array<Sawyer::Resource>
(also: #list_statuses)
List all statuses for a given commit.
Instance Method Details
#combined_status(repo, ref, options = {}) ⇒ Sawyer::Resource Also known as: status
Get the combined status for a ref
27 28 29 30 |
# File 'lib/octokit/client/statuses.rb', line 27 def combined_status(repo, ref, = {}) ensure_combined_status_api_media_type() get "repos/#{Repository.new(repo)}/commits/#{ref}/status", end |
#create_status(repo, sha, state, options = {}) ⇒ Sawyer::Resource
Create status for a commit
43 44 45 46 |
# File 'lib/octokit/client/statuses.rb', line 43 def create_status(repo, sha, state, = {}) .merge!(:state => state) post "repos/#{Repository.new(repo)}/statuses/#{sha}", end |
#statuses(repo, sha, options = {}) ⇒ Array<Sawyer::Resource> Also known as: list_statuses
List all statuses for a given commit
16 17 18 |
# File 'lib/octokit/client/statuses.rb', line 16 def statuses(repo, sha, = {}) get "repos/#{Repository.new(repo)}/statuses/#{sha}", end |