Module: Octokit::Client::Statuses

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

Overview

Methods for the Commit Statuses API

See Also:

Constant Summary

COMBINED_STATUS_MEDIA_TYPE =
"application/vnd.github.she-hulk-preview+json"

Instance Method Summary (collapse)

Instance Method Details

- (Sawyer::Resource) combined_status(repo, ref, options = {}) 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, options = {})
  ensure_combined_status_api_media_type(options)
  get "#{Repository.path repo}/commits/#{ref}/status", options
end

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

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:



43
44
45
46
# File 'lib/octokit/client/statuses.rb', line 43

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

- (Array<Sawyer::Resource>) statuses(repo, sha, options = {}) 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, options = {})
  get "#{Repository.path repo}/statuses/#{sha}", options
end