Sha256: e0ef1937349be046320a1c0e5d05764c3ae2f1f4850dc3d356b0d64fd2bd59b9
Contents?: true
Size: 547 Bytes
Versions: 1
Compression:
Stored size: 547 Bytes
Contents
require 'rest_client' require 'json' module Socialcast module Github def create_pull_request(username, password, branch) payload = {:title => branch, :base => 'master', :head => branch}.to_json response = RestClient::Request.new(:url => "https://api.github.com/repos/socialcast/socialcast/pulls", :method => "POST", :user => username, :password => password, :payload => payload, :headers => {:accept => :json, :content_type => :json}).execute data = JSON.parse response.body url = data['html_url'] end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
socialcast-git-extensions-2.2.4 | lib/socialcast-git-extensions/github.rb |