toolshed 0.0.2 → 0.0.3
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/toolshed/commands/create_github_pull_request.rb +12 -10
- data/lib/toolshed/github.rb +1 -1
- data/lib/toolshed/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8bce103d2a1bf41193284a42bb7becb56b0e42c0
|
4
|
+
data.tar.gz: 29b14927d5557de5eb05d1c0522200cc7946837e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50f1a5d696c57d038cb4eab0a4d2c8adaa765a8dd73872955bee92dea0b3f0a4c82249a20c0b9b68b7a88d0cfd6361d8c5d835dbc4c94c8a1838d4a5a02a8f6e
|
7
|
+
data.tar.gz: ce3bfae16b7f548f542c8b9490d1b7420a7ee2d23afbcc85c8855a64b9048803c1e721dd2ee5540b68dc58c6c59a2de1feae41e56f2876b4574d5521cdc71bf0
|
@@ -55,20 +55,22 @@ module Toolshed
|
|
55
55
|
|
56
56
|
# create the pull request
|
57
57
|
begin
|
58
|
+
puts "Running Github Pull Request"
|
58
59
|
github_pull_request_result = github.create_pull_request(github_pull_request_title, github_pull_request_body)
|
59
|
-
|
60
|
-
puts e.message
|
61
|
-
exit
|
62
|
-
end
|
60
|
+
puts "Github Pull Request URL: #{github_pull_request_result["html_url"]}"
|
63
61
|
|
64
|
-
|
65
|
-
|
66
|
-
|
62
|
+
if (Toolshed::Client.use_pivotal_tracker)
|
63
|
+
print "Would you like to add a note to PivotalTracker with the pull request URL(y/n)? "
|
64
|
+
update_pt_info = $stdin.gets.chomp.strip
|
67
65
|
|
68
|
-
|
69
|
-
|
70
|
-
|
66
|
+
if (update_pt_info == 'y')
|
67
|
+
result = pivotal_tracker.add_note(story_id, github_pull_request_result["html_url"])
|
68
|
+
result = pivotal_tracker.update_story_state(story_id, Toolshed::PivotalTracker::STORY_STATUS_DEFAULT)
|
69
|
+
end
|
71
70
|
end
|
71
|
+
rescue => e
|
72
|
+
puts e.message
|
73
|
+
exit
|
72
74
|
end
|
73
75
|
end
|
74
76
|
end
|
data/lib/toolshed/github.rb
CHANGED
@@ -23,7 +23,7 @@ module Toolshed
|
|
23
23
|
}.to_json
|
24
24
|
})
|
25
25
|
|
26
|
-
response = HTTParty.post("#{Toolshed::Client::GITHUB_BASE_API_URL}repos/#{Toolshed::Client.
|
26
|
+
response = HTTParty.post("#{Toolshed::Client::GITHUB_BASE_API_URL}repos/#{Toolshed::Client.branched_from_user}/#{Toolshed::Client.branched_from_repo_name}/pulls", options).response
|
27
27
|
response = JSON.parse(response.body)
|
28
28
|
|
29
29
|
if (response["errors"].nil?)
|
data/lib/toolshed/version.rb
CHANGED