socialcast-git-extensions 2.2.4 → 2.2.5

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.
@@ -15,5 +15,8 @@ password = HighLine.ask("Github password: ") { |q| q.echo = false }
15
15
 
16
16
  run_cmd 'git update'
17
17
 
18
- url = create_pull_request username, password, branch
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/socialcast/socialcast/pulls", :method => "POST", :user => username, :password => password, :payload => payload, :headers => {:accept => :json, :content_type => :json}).execute
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
@@ -1,5 +1,5 @@
1
1
  module Socialcast
2
2
  module Gitx
3
- VERSION = "2.2.4"
3
+ VERSION = "2.2.5"
4
4
  end
5
5
  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: 15
4
+ hash: 13
5
5
  prerelease:
6
6
  segments:
7
7
  - 2
8
8
  - 2
9
- - 4
10
- version: 2.2.4
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-25 00:00:00 Z
18
+ date: 2011-10-26 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: grit