socialcast-git-extensions 3.0.8 → 3.0.9
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.
@@ -38,7 +38,7 @@ module Socialcast
|
|
38
38
|
|
39
39
|
short_description = description.split("\n").first(5).join("\n")
|
40
40
|
review_message = ["@SocialcastDevelopers #reviewrequest for #{branch} #scgitx", short_description, changelog_summary(branch)].join("\n\n")
|
41
|
-
post review_message,
|
41
|
+
post review_message, :url => url, :message_type => 'review_request'
|
42
42
|
end
|
43
43
|
|
44
44
|
desc 'update', 'Update the current branch with latest changes from the remote feature branch and master'
|
@@ -168,6 +168,7 @@ module Socialcast
|
|
168
168
|
return if options[:quiet]
|
169
169
|
require 'socialcast'
|
170
170
|
require 'socialcast/message'
|
171
|
+
ActiveResource::Base.logger = Logger.new(STDOUT) if options[:trace]
|
171
172
|
Socialcast::Message.configure_from_credentials
|
172
173
|
Socialcast::Message.create params.merge(:body => message)
|
173
174
|
say "Message has been posted"
|
@@ -28,6 +28,7 @@ module Socialcast
|
|
28
28
|
throw e
|
29
29
|
end
|
30
30
|
|
31
|
+
# returns the url of the created pull request
|
31
32
|
# @see http://developer.github.com/v3/pulls/
|
32
33
|
def create_pull_request(token, branch, repo, body)
|
33
34
|
payload = {:title => branch, :base => Socialcast::Gitx::BASE_BRANCH, :head => branch, :body => body}.to_json
|
@@ -40,6 +41,7 @@ module Socialcast
|
|
40
41
|
response = RestClient::Request.new(:url => "https://api.github.com/repos/#{repo}/pulls", :method => "POST", :payload => payload, :headers => {:accept => :json, :content_type => :json, 'Authorization' => "token #{token}"}).execute
|
41
42
|
data = JSON.parse response.body
|
42
43
|
url = data['html_url']
|
44
|
+
url
|
43
45
|
rescue RestClient::Exception => e
|
44
46
|
process_error e
|
45
47
|
throw e
|
data/spec/cli_spec.rb
CHANGED
@@ -267,9 +267,11 @@ describe Socialcast::Gitx::CLI do
|
|
267
267
|
stub_request(:post, "https://api.github.com/repos/socialcast/socialcast-git-extensions/pulls").
|
268
268
|
to_return(:status => 200, :body => %q({"html_url": "http://github.com/repo/project/pulls/1"}), :headers => {})
|
269
269
|
|
270
|
+
Socialcast::Gitx::CLI.any_instance.should_receive(:post).with("@SocialcastDevelopers #reviewrequest for FOO #scgitx\n\ntesting\n\n", :url => 'http://github.com/repo/project/pulls/1', :message_type => 'review_request')
|
270
271
|
Socialcast::Gitx::CLI.start ['reviewrequest', '--description', 'testing']
|
271
272
|
end
|
272
273
|
it 'should create github pull request' do end # see expectations
|
274
|
+
it 'should post socialcast message' do end # see expectations
|
273
275
|
it 'should run expected commands' do
|
274
276
|
Socialcast::Gitx::CLI.stubbed_executed_commands.should == [
|
275
277
|
"git pull origin FOO",
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: socialcast-git-extensions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.9
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-09-
|
12
|
+
date: 2012-09-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: grit
|
@@ -230,7 +230,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
230
230
|
version: '0'
|
231
231
|
segments:
|
232
232
|
- 0
|
233
|
-
hash:
|
233
|
+
hash: 841044908944222691
|
234
234
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
235
235
|
none: false
|
236
236
|
requirements:
|
@@ -239,7 +239,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
239
239
|
version: '0'
|
240
240
|
segments:
|
241
241
|
- 0
|
242
|
-
hash:
|
242
|
+
hash: 841044908944222691
|
243
243
|
requirements: []
|
244
244
|
rubyforge_project: socialcast-git-extensions
|
245
245
|
rubygems_version: 1.8.24
|