git-pulls 0.3.6 → 0.3.7
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.
- data/lib/git-pulls.rb +14 -1
- metadata +2 -2
data/lib/git-pulls.rb
CHANGED
@@ -37,7 +37,7 @@ class GitPulls
|
|
37
37
|
|
38
38
|
def help
|
39
39
|
puts "No command: #{@command}"
|
40
|
-
puts "Try: update, list, show, merge, browse"
|
40
|
+
puts "Try: update, list, show, merge, checkout, browse"
|
41
41
|
puts "or call with '-h' for usage information"
|
42
42
|
end
|
43
43
|
|
@@ -48,6 +48,7 @@ Usage: git pulls update
|
|
48
48
|
or: git pulls show <number> [--full]
|
49
49
|
or: git pulls browse <number>
|
50
50
|
or: git pulls merge <number>
|
51
|
+
or: git pulls checkout [--force]
|
51
52
|
USAGE
|
52
53
|
end
|
53
54
|
|
@@ -125,9 +126,11 @@ Usage: git pulls update
|
|
125
126
|
|
126
127
|
def list
|
127
128
|
option = @args.shift
|
129
|
+
|
128
130
|
puts "Open Pull Requests for #{@user}/#{@repo}"
|
129
131
|
pulls = get_pull_info
|
130
132
|
pulls.reverse! if option == '--reverse'
|
133
|
+
|
131
134
|
count = 0
|
132
135
|
pulls.each do |pull|
|
133
136
|
line = []
|
@@ -147,6 +150,16 @@ Usage: git pulls update
|
|
147
150
|
end
|
148
151
|
end
|
149
152
|
|
153
|
+
def checkout
|
154
|
+
puts "Checking out all open pull requests for #{@user}/#{@repo}"
|
155
|
+
pulls = get_pull_info
|
156
|
+
pulls.each do |pull|
|
157
|
+
branch_ref = pull['head']['ref']
|
158
|
+
puts "> #{branch_ref} into pull-#{branch_ref}"
|
159
|
+
git("branch --track #{@args.join(' ')} pull-#{branch_ref} origin/#{branch_ref}")
|
160
|
+
end
|
161
|
+
end
|
162
|
+
|
150
163
|
def update
|
151
164
|
puts "Updating #{@user}/#{@repo}"
|
152
165
|
cache_pull_info
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git-pulls
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-11-
|
13
|
+
date: 2012-11-26 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: json
|