def create_pullrequest options
      project = options.fetch(:project)
      params = {
          :base => options.fetch(:base),
          :head => options.fetch(:head)
      }

      if options[:issue]
        params[:issue] = options[:issue]
      else
        params[:title] = options[:title] if options[:title]
        params[:body]  = options[:body]  if options[:body]
      end

      res = post "https://%s/repos/%s/%s/pulls" %
                     [api_host(project.host), project.owner, project.name], params

      res.error! unless res.success?
      res.data
    end
def create_pullrequest options
      project = options.fetch(:project)
      params = {
          :base => options.fetch(:base),
          :head => options.fetch(:head)
      }

      if options[:issue]
        params[:issue] = options[:issue]
      else
        params[:title] = options[:title] if options[:title]
        params[:body]  = options[:body]  if options[:body]
      end

      res = post "https://%s/repos/%s/%s/pulls" %
                     [api_host(project.host), project.owner, project.name], params

      res.error! unless res.success?
      res.data
    end
Returns parsed data from the new pull request.