Sha256: 7a8c4e3d95f42e396a4acccd5b3e69209de609214cfcc59ad743ca5819e7db6c
Contents?: true
Size: 1.17 KB
Versions: 4
Compression:
Stored size: 1.17 KB
Contents
module Octokit class Client # Methods for the Commit Statuses API # # @see http://developer.github.com/v3/repos/statuses/ module Statuses # List all statuses for a given commit # # @param repo [String, Repository, Hash] A GitHub repository # @param sha [String] The SHA1 for the commit # @return [Array<Sawyer::Resource>] A list of statuses # @see http://developer.github.com/v3/repos/statuses/#list-statuses-for-a-specific-ref def statuses(repo, sha, options = {}) get "repos/#{Repository.new(repo)}/statuses/#{sha}", options end alias :list_statuses :statuses # Create status for a commit # # @param repo [String, Repository, Hash] A GitHub repository # @param sha [String] The SHA1 for the commit # @param state [String] The state: pending, success, failure, error # @return [Sawyer::Resource] A status # @see http://developer.github.com/v3/repos/statuses/#create-a-status def create_status(repo, sha, state, options = {}) options.merge!(:state => state) post "repos/#{Repository.new(repo)}/statuses/#{sha}", options end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
octokit-3.0.0.pre | lib/octokit/client/statuses.rb |
octokit-2.7.2 | lib/octokit/client/statuses.rb |
octokit-2.7.1 | lib/octokit/client/statuses.rb |
octokit-2.7.0 | lib/octokit/client/statuses.rb |