Sha256: 03b32c3a8fada5e87f04305cef289913959d2f23caa9052fb9ae8573e3ca6236

Contents?: true

Size: 970 Bytes

Versions: 26

Compression:

Stored size: 970 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("repos/#{Repository.new(repo)}/pulls", options.merge(pull))
      end

      def create_pull_request_for_issue(repo, base, head, issue, options={})
        pull = {
          :base  => base,
          :head  => head,
          :issue => issue
        }
        post("repos/#{Repository.new(repo)}/pulls", options.merge(pull))
      end

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

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

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
octokit-1.12.0 lib/octokit/client/pulls.rb
octokit-1.11.0 lib/octokit/client/pulls.rb
octokit-1.10.0 lib/octokit/client/pulls.rb
octokit-1.9.4 lib/octokit/client/pulls.rb
octokit-1.9.3 lib/octokit/client/pulls.rb
octokit-1.9.2 lib/octokit/client/pulls.rb
octokit-1.9.1 lib/octokit/client/pulls.rb
octokit-1.8.1 lib/octokit/client/pulls.rb
octokit-1.8.0 lib/octokit/client/pulls.rb
octokit-1.7.0 lib/octokit/client/pulls.rb
octokit-1.6.1 lib/octokit/client/pulls.rb
octokit-1.6.0 lib/octokit/client/pulls.rb
octokit-1.5.0 lib/octokit/client/pulls.rb
octokit-1.4.0 lib/octokit/client/pulls.rb
octokit-1.3.0 lib/octokit/client/pulls.rb
octokit-1.2.1 lib/octokit/client/pulls.rb
octokit-1.2.0 lib/octokit/client/pulls.rb
octokit-1.1.1 lib/octokit/client/pulls.rb
octokit-1.1.0 lib/octokit/client/pulls.rb
octokit-1.0.7 lib/octokit/client/pulls.rb