open-pull-request 0.0.3 → 0.0.4
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/open-pull-request.rb +4 -5
- data/lib/open-pull-request/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: 38cd5de97affe6a7c1e2c136d16b34285ec7590a
|
|
4
|
+
data.tar.gz: 18b084fdb7bb40a0f403586c44482ffcae0b4294
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f6e179d640db7cefaef8d54da165bc7177d8d5b10dbe16c32a12a08b19918504895dfd583fb4376cbce5b5b5acefae6d832c6b8cb1cb93bcff8be2b614958a21
|
|
7
|
+
data.tar.gz: 007da553d3a9d9040afcfa4751a2dcbc29b9e77faacb4dce163761d2edec7e2b6dc5a22f76dcf43748960b41b613842a1e5414be6a9396ac5edfeff99e7503c6
|
data/lib/open-pull-request.rb
CHANGED
|
@@ -3,7 +3,6 @@ require_relative "open-pull-request/trello_details"
|
|
|
3
3
|
require 'cgi'
|
|
4
4
|
require 'optparse'
|
|
5
5
|
require 'ostruct'
|
|
6
|
-
require 'pry'
|
|
7
6
|
|
|
8
7
|
module Open
|
|
9
8
|
class PullRequest
|
|
@@ -30,10 +29,10 @@ module Open
|
|
|
30
29
|
root_url = "https://www.github.com/#{repo_url}/compare/"
|
|
31
30
|
compared_branches = "master...#{CGI.escape(branch.strip)}"
|
|
32
31
|
options = [
|
|
33
|
-
["pull_request[title]", pr_title],
|
|
32
|
+
["pull_request[title]", pr_title],
|
|
34
33
|
["pull_request[body]", pr_description]
|
|
35
|
-
].map{|pair|
|
|
36
|
-
pair.map{ |el| CGI.escape(el) }.join("=")
|
|
34
|
+
].map{|pair|
|
|
35
|
+
pair.map{ |el| CGI.escape(el) }.join("=")
|
|
37
36
|
}.join("&")
|
|
38
37
|
|
|
39
38
|
system("open", "#{root_url}#{compared_branches}?#{options}")
|
|
@@ -56,7 +55,7 @@ module Open
|
|
|
56
55
|
|
|
57
56
|
def option_parser
|
|
58
57
|
@option_parser ||= OptionParser.new do |op|
|
|
59
|
-
|
|
58
|
+
|
|
60
59
|
op.on("-t", "--trello CARD_ID", "Trello card id to pull info from") do |v|
|
|
61
60
|
options.trello_card_id = v
|
|
62
61
|
end
|