Sha256: 8743aceda31cf81db3775ec81182fc2f4f60b1e8554c52fae4e25583587691a6

Contents?: true

Size: 704 Bytes

Versions: 10

Compression:

Stored size: 704 Bytes

Contents

module Octokit
  class Client
    module Pulls
      def create_pull_request(repo, base, head, title, body, options={})
        pull = {
          :base  => base,
          :head  => head,
          :title => title,
          :body  => body,
        }
        post("pulls/#{Repository.new(repo)}", options.merge({:pull => pull}))['pulls']
      end

      def pull_requests(repo, state='open', options={})
        get("pulls/#{Repository.new(repo)}/#{state}", options)['pulls']
      end
      alias :pulls :pull_requests

      def pull_request(repo, number, options={})
        get("pulls/#{Repository.new(repo)}/#{number}", options)['pull']
      end
      alias :pull :pull_request
    end
  end
end

Version data entries

10 entries across 10 versions & 3 rubygems

Version Path
octokit-0.6.2 lib/octokit/client/pulls.rb
hybridgroup-octokit-0.6.3 lib/octokit/client/pulls.rb
hybridgroup-octokit-0.6.2 lib/octokit/client/pulls.rb
hybridgroup-octokit-0.6.1 lib/octokit/client/pulls.rb
xn-octokit-0.6.1 lib/octokit/client/pulls.rb
octokit-0.6.1 lib/octokit/client/pulls.rb
octokit-0.6.0 lib/octokit/client/pulls.rb
octokit-0.5.2 lib/octokit/client/pulls.rb
octokit-0.5.1 lib/octokit/client/pulls.rb
octokit-0.5.0 lib/octokit/client/pulls.rb