thegarage-gitx 1.5.0.pre1 → 1.5.0.pre2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/thegarage/gitx/github.rb +7 -4
- data/lib/thegarage/gitx/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 52a37776bf7e23d9faaaf25714ec07c74e7d5cea
|
4
|
+
data.tar.gz: 262bf66a8b98d07f2d76942203e5a82da32b8eb5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 52299513ccc1b006bf64638722b04625319fade28138d35556128d4973e29d15360c9b9507434d97fdbdd365d85c72d29ddf3c73e8469f77dce5cbff8a6d9e18
|
7
|
+
data.tar.gz: d4ea5dc594034d96ae2a4e9788dbe9ace26349652c61ec9337bdc6f997c8e7dc261fc2e8566d4b9ff71d996eaf541a82b48214f056a8f7468d828585135ac880
|
@@ -64,7 +64,6 @@ module Thegarage
|
|
64
64
|
|
65
65
|
# @see http://developer.github.com/v3/pulls/
|
66
66
|
def create_pull_request(branch, changelog, options = {})
|
67
|
-
remote = remote_origin_name
|
68
67
|
body = pull_request_body(changelog, options[:description])
|
69
68
|
|
70
69
|
shell.say "Creating pull request for "
|
@@ -72,7 +71,7 @@ module Thegarage
|
|
72
71
|
shell.say "against "
|
73
72
|
shell.say "#{Thegarage::Gitx::BASE_BRANCH} ", :green
|
74
73
|
shell.say "in "
|
75
|
-
shell.say
|
74
|
+
shell.say remote_origin_name, :green
|
76
75
|
|
77
76
|
payload = {
|
78
77
|
:title => branch,
|
@@ -80,7 +79,7 @@ module Thegarage
|
|
80
79
|
:head => branch,
|
81
80
|
:body => body
|
82
81
|
}.to_json
|
83
|
-
response = RestClient::Request.new(:url =>
|
82
|
+
response = RestClient::Request.new(:url => pull_request_url, :method => "POST", :payload => payload, :headers => request_headers).execute
|
84
83
|
pull_request = JSON.parse response.body
|
85
84
|
|
86
85
|
pull_request
|
@@ -105,7 +104,7 @@ module Thegarage
|
|
105
104
|
payload = {
|
106
105
|
course: branch
|
107
106
|
}.to_json
|
108
|
-
response = RestClient::Request.new(:url =>
|
107
|
+
response = RestClient::Request.new(:url => remote_origin_name, :method => "GET", :payload => payload, :headers => request_headers).execute
|
109
108
|
data = JSON.parse(response.body)
|
110
109
|
data.first
|
111
110
|
rescue RestClient::Exception => e
|
@@ -120,6 +119,10 @@ module Thegarage
|
|
120
119
|
throw e
|
121
120
|
end
|
122
121
|
|
122
|
+
def pull_request_url
|
123
|
+
"https://api.github.com/repos/#{remote_origin_name}/pulls"
|
124
|
+
end
|
125
|
+
|
123
126
|
def request_headers
|
124
127
|
{
|
125
128
|
:accept => :json,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thegarage-gitx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.0.
|
4
|
+
version: 1.5.0.pre2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Sonnek
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03-
|
11
|
+
date: 2014-03-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: grit
|