stephencelis-ghi 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/History.rdoc +9 -1
- data/README.rdoc +30 -13
- data/lib/ghi/cli.rb +9 -9
- data/lib/ghi.rb +1 -1
- metadata +1 -1
data/History.rdoc
CHANGED
data/README.rdoc
CHANGED
@@ -3,7 +3,8 @@
|
|
3
3
|
http://github.com/stephencelis/ghi
|
4
4
|
|
5
5
|
|
6
|
-
GitHub Issues on the command line. Use your
|
6
|
+
GitHub Issues on the command line. Use your <tt>$EDITOR</tt>, not your
|
7
|
+
browser.
|
7
8
|
|
8
9
|
== HOW?
|
9
10
|
|
@@ -22,25 +23,32 @@ Go:
|
|
22
23
|
-c, --closed, --close [number]
|
23
24
|
-e, --edit [number]
|
24
25
|
-r, --repo, --repository [name]
|
25
|
-
--
|
26
|
+
-m, --comment [number|comment]
|
27
|
+
--claim [number]
|
26
28
|
|
27
29
|
|
28
30
|
== EXAMPLE?
|
29
31
|
|
30
|
-
|
32
|
+
ghi works simply from within the directory. Some short examples:
|
31
33
|
|
32
|
-
ghi -l
|
33
|
-
ghi -lc
|
34
|
-
ghi -l "doesn't work"
|
35
|
-
ghi -l invalid -c
|
36
|
-
ghi -o
|
37
|
-
ghi -
|
38
|
-
ghi -
|
39
|
-
ghi -
|
40
|
-
ghi
|
34
|
+
ghi -l # Lists all open issues
|
35
|
+
ghi -lc # Lists all closed issues
|
36
|
+
ghi -l "doesn't work" # Searches for open issues matching "doesn't work"
|
37
|
+
ghi -l invalid -c # Searches for closed issues matching "invalid"
|
38
|
+
ghi -o # Opens a new issue (in your $EDITOR)
|
39
|
+
ghi -o "New issue" # Opens a new issue with the title "New issue"
|
40
|
+
ghi -o "Title" -m "Body" # Opens a new issue with specified title and body
|
41
|
+
ghi -e1 # Edits issue number 1 (in your $EDITOR)
|
42
|
+
ghi -e1 -m "New body" # Edits issue number 1 with the specified body
|
43
|
+
ghi -c1 # Closes issue 1
|
44
|
+
ghi -c1 -m # Closes issue with comment (from your $EDITOR)
|
45
|
+
ghi -c1 -m "Comment" # Closes issue with specified comment
|
46
|
+
ghi -o1 # Reopens 1 (accepts comments, too)
|
47
|
+
ghi -m1 # Comments on issue 1 (in your $EDITOR)
|
48
|
+
ghi --claim 1 # Tags issue 1 with your GitHub username
|
41
49
|
|
42
50
|
|
43
|
-
|
51
|
+
ghi also works anywhere:
|
44
52
|
|
45
53
|
ghi -rghi -l # Your fork of "ghi"
|
46
54
|
ghi -rstephencelis/ghi -l # Mine: "stephencelis/ghi"
|
@@ -49,3 +57,12 @@ Go:
|
|
49
57
|
== CONTRIBUTORS
|
50
58
|
|
51
59
|
* Jamie Macey (http://blog.tracefunc.com)
|
60
|
+
|
61
|
+
|
62
|
+
=== CONTRIBUTE?
|
63
|
+
|
64
|
+
ghi is not under currently under the control of any gem packaging system. To
|
65
|
+
build, use RubyGems:
|
66
|
+
|
67
|
+
% gem build ghi.gemspec
|
68
|
+
% sudo gem install ghi*.gem
|
data/lib/ghi/cli.rb
CHANGED
@@ -52,7 +52,7 @@ module GHI::CLI #:nodoc:
|
|
52
52
|
@message = File.readlines(file.path).find_all { |l| !l.match(/^#/) }
|
53
53
|
|
54
54
|
if message.to_s =~ /\A\s*\Z/
|
55
|
-
raise GHI::API::InvalidRequest, "can't file empty
|
55
|
+
raise GHI::API::InvalidRequest, "can't file empty message"
|
56
56
|
end
|
57
57
|
raise GHI::API::InvalidRequest, "no change" if issue == message
|
58
58
|
end
|
@@ -316,22 +316,22 @@ module GHI::CLI #:nodoc:
|
|
316
316
|
|
317
317
|
def close
|
318
318
|
issue = api.close number
|
319
|
-
if @comment
|
320
|
-
|
321
|
-
comment = api.comment number,
|
319
|
+
if @comment || new_body = body
|
320
|
+
new_body ||= gets_from_editor issue
|
321
|
+
comment = api.comment number, new_body
|
322
322
|
end
|
323
323
|
puts action_format(issue.title)
|
324
|
-
puts "comment #{comment["status"]}" if comment
|
324
|
+
puts "(comment #{comment["status"]})" if comment
|
325
325
|
end
|
326
326
|
|
327
327
|
def reopen
|
328
328
|
issue = api.reopen number
|
329
|
-
if @comment
|
330
|
-
|
331
|
-
comment = api.comment number,
|
329
|
+
if @comment || new_body = body
|
330
|
+
new_body ||= gets_from_editor issue
|
331
|
+
comment = api.comment number, new_body
|
332
332
|
end
|
333
333
|
puts action_format(issue.title)
|
334
|
-
puts "comment #{comment["status"]}" if comment
|
334
|
+
puts "(comment #{comment["status"]})" if comment
|
335
335
|
end
|
336
336
|
|
337
337
|
def label
|
data/lib/ghi.rb
CHANGED