socialcast-git-extensions 2.2.4 → 2.2.5
Sign up to get free protection for your applications and to get access to all the features.
data/bin/git-reviewrequest
CHANGED
@@ -15,5 +15,8 @@ password = HighLine.ask("Github password: ") { |q| q.echo = false }
|
|
15
15
|
|
16
16
|
run_cmd 'git update'
|
17
17
|
|
18
|
-
|
18
|
+
repo = `git config -z --get remote.origin.url`.strip
|
19
|
+
# ex: git@github.com:socialcast/socialcast-git-extensions.git
|
20
|
+
repo = repo.scan(/:(.+\/.+)\./).first.first
|
21
|
+
url = create_pull_request username, password, branch, repo
|
19
22
|
share "@SocialcastDevelopers #reviewrequest for #{branch} #scgitx", url
|
@@ -3,9 +3,9 @@ require 'json'
|
|
3
3
|
|
4
4
|
module Socialcast
|
5
5
|
module Github
|
6
|
-
def create_pull_request(username, password, branch)
|
6
|
+
def create_pull_request(username, password, branch, repo)
|
7
7
|
payload = {:title => branch, :base => 'master', :head => branch}.to_json
|
8
|
-
response = RestClient::Request.new(:url => "https://api.github.com/repos/
|
8
|
+
response = RestClient::Request.new(:url => "https://api.github.com/repos/#{repo}/pulls", :method => "POST", :user => username, :password => password, :payload => payload, :headers => {:accept => :json, :content_type => :json}).execute
|
9
9
|
data = JSON.parse response.body
|
10
10
|
url = data['html_url']
|
11
11
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: socialcast-git-extensions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 13
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 2.2.
|
9
|
+
- 5
|
10
|
+
version: 2.2.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ryan Sonnek
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-10-
|
18
|
+
date: 2011-10-26 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: grit
|