Skip to content

Commit

Permalink
fixed a tiny bug
Browse files Browse the repository at this point in the history
Pull request being sent successfully across repos
  • Loading branch information
Siddharth Sharma committed Feb 12, 2012
1 parent fcbfd4e commit 38572a9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bin/pull
Expand Up @@ -92,13 +92,13 @@ def try_to_create_pull_request(base = @base, head = @head, title = @title, body
print "please type some desriptive text for this pull request"
body = STDIN.gets.chomp
end
post = Net::HTTP::Post.new(api_uri.request_uri)
uri = api_uri(@user,@repo)
post = Net::HTTP::Post.new(uri.request_uri)
post.basic_auth("#{current_user}/token", current_token)
post.set_form_data("pull[base]" => base,
"pull[head]" => head,
"pull[title]" => title)

uri = api_uri(@user,@repo)
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
response = http.request(post)
Expand Down Expand Up @@ -146,8 +146,8 @@ elsif pull_to.match(":")
if ['y',''].include?(STDIN.gets.chomp.downcase)
@base = parent_branch
@head = "#{current_user}:#{current_branch}"
@user = parent_branch.split("/")[0]
@repo = parent_branch.split("/")[1]
@user = parent_repo.split("/")[0]
@repo = parent_repo.split("/")[1]
else
exit 1
end
Expand Down

0 comments on commit 38572a9

Please sign in to comment.