gish 0.9.3 → 0.9.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/CHANGELOG.md +4 -0
- data/README.md +8 -8
- data/lib/gish/commands/issue.rb +6 -2
- data/lib/gish/commands/repository.rb +9 -0
- data/lib/gish/presentation/issue.rb +2 -0
- data/lib/gish/runner.rb +16 -4
- data/lib/gish/version.rb +1 -1
- data/lib/gish.rb +3 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 17282a83906eb4c54cdc4d3838481027fae4f156
|
4
|
+
data.tar.gz: 7fed2aa273b24b43232bbe174dff64e8d55262d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b776cbc5849dcf4798b87c74a8d4b36b5ef785117b914fb2d2d76402a3af40992152447632024639796d8f208406e127ba5865cbc43cd7a833844f4091cfcdd
|
7
|
+
data.tar.gz: 39befa93204e4e50b62293cd584f976878c4466bcf0f4825903186611d04b871b2d25bcd5e4b3d9b7babcf0a16ad3eac179c24f0b07c4b412983bd2050e59095
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -48,14 +48,14 @@ Here are some examples to get you started.
|
|
48
48
|
When listing issues, the number of comments on an issue will be displayed at the end of a line, along with a tag indicating if the issue is a pull request.
|
49
49
|
|
50
50
|
```
|
51
|
-
#9 barisbalic Emoji! [PR]
|
52
|
-
#8 barisbalic Fix editor input for open command
|
53
|
-
#7 barisbalic Support API paging
|
54
|
-
#6 barisbalic Current repository check is lame
|
55
|
-
#5 barisbalic Format issue and comment times
|
56
|
-
#4 barisbalic Enhance terminal output
|
57
|
-
#2 barisbalic Check issue assignee
|
58
|
-
#1 barisbalic Add config subcommand
|
51
|
+
#9 barisbalic Emoji! [PR] 2 comments
|
52
|
+
#8 barisbalic Fix editor input for open command 0 comments
|
53
|
+
#7 barisbalic Support API paging 0 comments
|
54
|
+
#6 barisbalic Current repository check is lame 1 comments
|
55
|
+
#5 barisbalic Format issue and comment times 0 comments
|
56
|
+
#4 barisbalic Enhance terminal output 0 comments
|
57
|
+
#2 barisbalic Check issue assignee 0 comments
|
58
|
+
#1 barisbalic Add config subcommand 0 comments
|
59
59
|
```
|
60
60
|
|
61
61
|
|
data/lib/gish/commands/issue.rb
CHANGED
@@ -21,6 +21,10 @@ module Gish
|
|
21
21
|
request { client.create_issue(Gish.repository, title, body, options) }
|
22
22
|
end
|
23
23
|
|
24
|
+
def edit(issue_number, title, body)
|
25
|
+
request { client.update_issue(Gish.repository, issue_number, title, body, {}) }
|
26
|
+
end
|
27
|
+
|
24
28
|
def close(issue_number, comment=nil)
|
25
29
|
request { client.close_issue(Gish.repository, issue_number)}
|
26
30
|
end
|
@@ -45,7 +49,7 @@ module Gish
|
|
45
49
|
labels.each do |l|
|
46
50
|
request { client.remove_label(Gish.repository, issue_number, l.strip) }
|
47
51
|
end
|
48
|
-
end
|
52
|
+
end
|
49
53
|
|
50
54
|
def assign(issue_number, user_login)
|
51
55
|
options = {:assignee => user_login}
|
@@ -64,4 +68,4 @@ module Gish
|
|
64
68
|
end
|
65
69
|
end
|
66
70
|
end
|
67
|
-
end
|
71
|
+
end
|
data/lib/gish/runner.rb
CHANGED
@@ -15,7 +15,7 @@ module Gish
|
|
15
15
|
return unless options.repository? && options.repository != 'repository'
|
16
16
|
Gish.repository = options.repository
|
17
17
|
end
|
18
|
-
|
18
|
+
|
19
19
|
desc 'labels SUBCOMMAND ...ARGS', 'Manage labels for the repository.'
|
20
20
|
subcommand 'labels', Gish::Cli::Labels
|
21
21
|
|
@@ -46,7 +46,7 @@ module Gish
|
|
46
46
|
def list(count=20)
|
47
47
|
args = {:per_page => count}
|
48
48
|
args[:state] = 'closed' if options.closed?
|
49
|
-
args[:direction] = 'asc' if options.order == 'asc'
|
49
|
+
args[:direction] = 'asc' if options.order == 'asc'
|
50
50
|
puts Gish.list(args)
|
51
51
|
end
|
52
52
|
|
@@ -86,7 +86,9 @@ module Gish
|
|
86
86
|
|
87
87
|
desc 'assign ISSUE_NUMBER USER_LOGIN', 'Assign an issue to a user.'
|
88
88
|
def assign(issue_number, user_login)
|
89
|
-
Gish.assign(issue_number, user_login)
|
89
|
+
return Gish.assign(issue_number, user_login) if Gish.is_collaborator?(user_login)
|
90
|
+
|
91
|
+
puts "#{user_login} is not a collaborator on #{Gish.repository}"
|
90
92
|
end
|
91
93
|
|
92
94
|
desc 'unassign ISSUE_NUMBER', 'Unassign an issue.'
|
@@ -106,9 +108,19 @@ module Gish
|
|
106
108
|
Gish.create(title, message, labels, assignee)
|
107
109
|
end
|
108
110
|
|
111
|
+
desc 'edit ISSUE_NUMBER', 'Edit an issue.'
|
112
|
+
method_option :title, :type => :string, :aliases => '-t', :desc => 'Specify the new title'
|
113
|
+
def edit(issue_number)
|
114
|
+
issue = Gish.show(issue_number)
|
115
|
+
message = capture_editor_input(issue.body)
|
116
|
+
title = options.title unless options.nil? and options.title.nil?
|
117
|
+
title ||= issue.title
|
118
|
+
Gish.edit(issue_number, title, message)
|
119
|
+
end
|
120
|
+
|
109
121
|
desc 'version', 'Display the version of Gish.'
|
110
122
|
def version
|
111
123
|
puts "v#{Gish::VERSION}"
|
112
124
|
end
|
113
125
|
end
|
114
|
-
end
|
126
|
+
end
|
data/lib/gish/version.rb
CHANGED
data/lib/gish.rb
CHANGED
@@ -7,6 +7,7 @@ require "gish/commands/issue"
|
|
7
7
|
require "gish/commands/comment"
|
8
8
|
require "gish/commands/label"
|
9
9
|
require "gish/commands/assignee"
|
10
|
+
require "gish/commands/repository"
|
10
11
|
require "gish/presentation/issue"
|
11
12
|
require "gish/presentation/label"
|
12
13
|
require "gish/presentation/comment"
|
@@ -28,11 +29,12 @@ module Gish
|
|
28
29
|
rescue Octokit::Unauthorized
|
29
30
|
puts "Something is wrong with your personal access token."
|
30
31
|
exit 1
|
31
|
-
end
|
32
|
+
end
|
32
33
|
end
|
33
34
|
|
34
35
|
extend Gish::Commands::Label
|
35
36
|
extend Gish::Commands::Issue
|
36
37
|
extend Gish::Commands::Comment
|
37
38
|
extend Gish::Commands::Assignee
|
39
|
+
extend Gish::Commands::Repository
|
38
40
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gish
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Baris Balic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-01-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -90,6 +90,7 @@ files:
|
|
90
90
|
- lib/gish/commands/comment.rb
|
91
91
|
- lib/gish/commands/issue.rb
|
92
92
|
- lib/gish/commands/label.rb
|
93
|
+
- lib/gish/commands/repository.rb
|
93
94
|
- lib/gish/configuration.rb
|
94
95
|
- lib/gish/helpers/date_helpers.rb
|
95
96
|
- lib/gish/helpers/input_helpers.rb
|