Module: Octokit::Client::Statuses

Included in:
Octokit::Client
Defined in:
lib/octokit/client/statuses.rb

Overview

Methods for the Commit Statuses API

Instance Method Summary collapse

Instance Method Details

#combined_status(repo, ref, options = {}) ⇒ Sawyer::Resource Also known as: status

Get the combined status for a ref



26
27
28
# File 'lib/octokit/client/statuses.rb', line 26

def combined_status(repo, ref, options = {})
  get "#{Repository.path repo}/commits/#{ref}/status", options
end

#create_status(repo, sha, state, options = {}) ⇒ Sawyer::Resource

Create status for a commit

Options Hash (options):

  • :context (String)

    A context to differentiate this status from others

  • :target_url (String)

    A link to more details about this status

  • :description (String)

    A short human-readable description of this status

See Also:



41
42
43
44
# File 'lib/octokit/client/statuses.rb', line 41

def create_status(repo, sha, state, options = {})
  options.merge!(:state => state)
  post "#{Repository.path repo}/statuses/#{sha}", options
end

#statuses(repo, sha, options = {}) ⇒ Array<Sawyer::Resource> Also known as: list_statuses

List all statuses for a given commit



15
16
17
# File 'lib/octokit/client/statuses.rb', line 15

def statuses(repo, sha, options = {})
  get "#{Repository.path repo}/statuses/#{sha}", options
end