class Github::Repos::Statuses
involving those commits.
failure, error, or pending state, which is then reflected in pull requests
The Status API allows external services to mark commits with a success,
def create(*args)
"description" => "Successful build #3 from origin/master"
"target_url" => "http://ci.example.com/johndoe/my-repo/builds/sha",
"state" => "success",
github.repos.statuses.create 'user-name', 'repo-name', 'sha',
github = Github.new
= Examples
* :description - Optional string - Short description of the status
to easily see the ‘source’ of the Status.
status. This URL will be linked from the GitHub UI to allow users
* :target_url - Optional string - Target url to associate with this
pending, success, error, or failure.
* :state - Required string - State of the status - can be one of
= Inputs
Create a status
def create(*args) arguments(args, :required => [:user, :repo, :sha]) do sift VALID_STATUS_PARAM_NAMES, :recursive => false assert_required REQUIRED_PARAMS end params = arguments.params post_request("/repos/#{user}/#{repo}/statuses/#{sha}", params) end
def list(*args)
github.repos.statuses.list 'user-name', 'repo-name', 'sha' { |status| ... }
github.repos.statuses.list 'user-name', 'repo-name', 'sha'
github = Github.new
= Examples
List Statuses for a specific SHA
def list(*args) arguments(args, :required => [:user, :repo, :sha]) params = arguments.params response = get_request("/repos/#{user}/#{repo}/statuses/#{sha}", params) return response unless block_given? response.each { |el| yield el } end