Module: Octokit::Client::Statuses
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Included In:
| |
Defined in: | lib/octokit/client/statuses.rb |
Overview
Methods for the Commit Statuses API
Instance Method Summary
-
#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.
-
#list_statuses(repo, sha, options = {})
Alias for #statuses.
-
#status(repo, ref, options = {})
Alias for #combined_status.
-
#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
# File 'lib/octokit/client/statuses.rb', line 26
def combined_status(repo, ref, = {}) get "#{Repository.path repo}/commits/#{ref}/status", end
#create_status(repo, sha, state, options = {}) ⇒ Sawyer::Resource
Create status for a commit
# File 'lib/octokit/client/statuses.rb', line 41
def create_status(repo, sha, state, = {}) = .merge(state: state) post "#{Repository.path repo}/statuses/#{sha}", end
#list_statuses(repo, sha, options = {})
Alias for #statuses.
# File 'lib/octokit/client/statuses.rb', line 18
alias list_statuses statuses
#status(repo, ref, options = {})
Alias for #combined_status.
# File 'lib/octokit/client/statuses.rb', line 29
alias status combined_status
#statuses(repo, sha, options = {}) ⇒ Array
<Sawyer::Resource
>
Also known as: #list_statuses
List all statuses for a given commit
# File 'lib/octokit/client/statuses.rb', line 15
def statuses(repo, sha, = {}) paginate "#{Repository.path repo}/statuses/#{sha}", end