ghedsh 1.1.26 → 1.1.27
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/actions/help.rb +23 -1
- data/lib/actions/repo.rb +43 -17
- data/lib/actions/system.rb +1 -1
- data/lib/interface.rb +16 -11
- data/lib/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 125bdd2d4f3464689b742e68f61ebbbede5f79a7
|
4
|
+
data.tar.gz: aed94f3d680aa969746f204bf8a3fa7d63b9a7db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9facac447d53fd20d61357211f054adc0f767adc18000c0706b1208c733a26568fc656d2c5333df97b2f32c6af5405bb582e1b24140915f835ff3d1515a4a62c
|
7
|
+
data.tar.gz: 4c966951620fa29637db0f1aa68db4698591997a46230b54f9b62feac170d11c42c345081bc746eccb773c52f3c8eb60534afefb7d289e616a55fbeb4c9abde2
|
data/lib/actions/help.rb
CHANGED
@@ -54,9 +54,16 @@ class HelpM
|
|
54
54
|
print "\n\tCOMMAND\t\t\tDESCRIPTION\n\n"
|
55
55
|
print "\tinfo\t\t\tShow information about the repository\n"
|
56
56
|
print "\tcommits\t\t\tShow the list of commits from the repository\n"
|
57
|
+
print "\tnew_issue\t\tCreates a new issue\n"
|
57
58
|
print "\tissues\t\t\tShow the list of issues from the repository\n"
|
58
59
|
print "\tissue\t\t\tShow the issue and its comments\n"
|
59
60
|
print "\t\t\t\t->\tissue [Id of the issue]\n\n"
|
61
|
+
print "\tadd_issue_comment\tAdd a comment in a specific issue\n"
|
62
|
+
print "\t\t\t\t->\tadd_issue_comment [Id of the issue]\n\n"
|
63
|
+
print "\topen_issue\t\tOpen a closed issue\n"
|
64
|
+
print "\t\t\t\t->\topen_issue [Id of the issue]\n\n"
|
65
|
+
print "\tclose_issue\t\tClose an opened issue\n"
|
66
|
+
print "\t\t\t\t->\tclose_issue [Id of the issue]\n\n"
|
60
67
|
print "\tfiles\t\t\tShow the files of the repository path given\n"
|
61
68
|
print "\tcat\t\t\tShow data from a file\n"
|
62
69
|
print "\t\t\t\t->\tcat [file]\n\n"
|
@@ -81,9 +88,16 @@ class HelpM
|
|
81
88
|
print "\n\tCOMMAND\t\t\tDESCRIPTION\n\n"
|
82
89
|
print "\tinfo\t\t\tShow information about the repository\n"
|
83
90
|
print "\tcommits\t\t\tShow the list of commits from the repository\n"
|
91
|
+
print "\tnew_issue\t\tCreates a new issue\n"
|
84
92
|
print "\tissues\t\t\tShow the list of issues from the repository\n"
|
85
93
|
print "\tissue\t\t\tShow the issue and its comments\n"
|
86
94
|
print "\t\t\t\t->\tissue [Id of the issue]\n\n"
|
95
|
+
print "\tadd_issue_comment\tAdd a comment in a specific issue\n"
|
96
|
+
print "\t\t\t\->\tadd_issue_comment [Id of the issue]\n\n"
|
97
|
+
print "\topen_issue\t\tOpen a closed issue\n"
|
98
|
+
print "\t\t\t\t->\topen_issue [Id of the issue]\n\n"
|
99
|
+
print "\tclose_issue\t\tClose an opened issue\n"
|
100
|
+
print "\t\t\t\t->\tclose_issue [Id of the issue]\n\n"
|
87
101
|
print "\tfiles\t\t\tShow the files of the repository path given\n"
|
88
102
|
print "\tcat\t\t\tShow data from a file\n"
|
89
103
|
print "\t\t\t\t->\tcat [file]\n\n"
|
@@ -97,9 +111,16 @@ class HelpM
|
|
97
111
|
print "\n\tCOMMAND\t\t\tDESCRIPTION\n\n"
|
98
112
|
print "\tinfo\t\t\tShow information about the repository\n"
|
99
113
|
print "\tcommits\t\t\tShow the list of commits from the repository\n"
|
114
|
+
print "\tnew_issue\t\tCreates a new issue\n"
|
100
115
|
print "\tissues\t\t\tShow the list of issues from the repository\n"
|
101
116
|
print "\tissue\t\t\tShow the issue and its comments\n"
|
117
|
+
print "\tadd_issue_comment\tAdd a comment in a specific issue\n"
|
118
|
+
print "\t\t\t\t->\tadd_issue_comment [Id of the issue]\n\n"
|
102
119
|
print "\t\t\t\t->\tissue [Id of the issue]\n\n"
|
120
|
+
print "\topen_issue\t\tOpen a closed issue\n"
|
121
|
+
print "\t\t\t\t->\topen_issue [Id of the issue]\n\n"
|
122
|
+
print "\tclose_issue\t\tClose an opened issue\n"
|
123
|
+
print "\t\t\t\t->\tclose_issue [Id of the issue]\n\n"
|
103
124
|
print "\tfiles\t\t\tShow the files of the repository path given\n"
|
104
125
|
print "\tcat\t\t\tShow data from a file\n"
|
105
126
|
print "\t\t\t\t->\tcat [file]\n\n"
|
@@ -124,7 +145,8 @@ class HelpM
|
|
124
145
|
print "\t\t\t\t->\tcd\n\n"
|
125
146
|
print "\t\t\t\tYou can go back to the previous level with the argument ".."\n"
|
126
147
|
print "\t\t\t\t->\tcd [..]\n\n"
|
127
|
-
print "\t\t\t\tDefault search look for repositories at the end of the queue
|
148
|
+
print "\t\t\t\tDefault search look for repositories at the end of the queue.\n"
|
149
|
+
print "\t\t\t\tIf you want to look for an specific repository use: \n"
|
128
150
|
print "\t\t\t\t->\tcd repo [name] \n\n"
|
129
151
|
print "\t!\t\t\tExecute a bash command\n\n"
|
130
152
|
end
|
data/lib/actions/repo.rb
CHANGED
@@ -89,28 +89,36 @@ class Repositories
|
|
89
89
|
end
|
90
90
|
|
91
91
|
def close_issue(client,config,scope,id)
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
92
|
+
begin
|
93
|
+
case
|
94
|
+
when scope==USER_REPO
|
95
|
+
if config["Repo"].split("/").size == 1
|
96
|
+
client.close_issue(config["User"]+"/"+config["Repo"],id)
|
97
|
+
else
|
98
|
+
client.close_issue(config["Repo"],id)
|
99
|
+
end
|
100
|
+
when scope==ORGS_REPO || scope==TEAM_REPO
|
101
|
+
client.close_issue(config["Org"]+"/"+config["Repo"],id)
|
98
102
|
end
|
99
|
-
|
100
|
-
|
103
|
+
rescue
|
104
|
+
puts "Issue not found"
|
101
105
|
end
|
102
106
|
end
|
103
107
|
|
104
108
|
def open_issue(client,config,scope,id)
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
109
|
+
begin
|
110
|
+
case
|
111
|
+
when scope==USER_REPO
|
112
|
+
if config["Repo"].split("/").size == 1
|
113
|
+
client.reopen_issue(config["User"]+"/"+config["Repo"],id)
|
114
|
+
else
|
115
|
+
client.reopen_issue(config["Repo"],id)
|
116
|
+
end
|
117
|
+
when scope==ORGS_REPO || scope==TEAM_REPO
|
118
|
+
client.reopen_issue(config["Org"]+"/"+config["Repo"],id)
|
111
119
|
end
|
112
|
-
|
113
|
-
|
120
|
+
rescue
|
121
|
+
puts "Issue not found"
|
114
122
|
end
|
115
123
|
end
|
116
124
|
|
@@ -199,7 +207,25 @@ class Repositories
|
|
199
207
|
end
|
200
208
|
|
201
209
|
#add issue comment
|
202
|
-
def add_issue_cm
|
210
|
+
def add_issue_cm(client,config,scope,id)
|
211
|
+
puts "Add a description: "
|
212
|
+
desc=gets.chomp
|
213
|
+
puts desc
|
214
|
+
puts id
|
215
|
+
begin
|
216
|
+
case
|
217
|
+
when scope==USER_REPO
|
218
|
+
if config["Repo"].split("/").size == 1
|
219
|
+
client.add_comment(config["User"]+"/"+config["Repo"],id,desc)
|
220
|
+
else
|
221
|
+
client.add_comment(config["Repo"],id,desc)
|
222
|
+
end
|
223
|
+
when scope==ORGS_REPO || scope==TEAM_REPO
|
224
|
+
client.add_comment(config["Org"]+"/"+config["Repo"],id,desc)
|
225
|
+
end
|
226
|
+
rescue
|
227
|
+
puts "Issue not found"
|
228
|
+
end
|
203
229
|
end
|
204
230
|
|
205
231
|
#Show repositories and return a list of them
|
data/lib/actions/system.rb
CHANGED
@@ -11,7 +11,7 @@ class Sys
|
|
11
11
|
attr_reader :memory
|
12
12
|
LIST = ['repos', 'exit', 'orgs','help', 'people','teams', 'cd ', 'cd repo ','commits','forks', 'add_team_member ','new_team ','rm_team ','new_repository ','new_assignment ','clone ', 'issues',
|
13
13
|
'version', 'cat ', 'groups', 'files', 'assignments','new_issue ', 'open_issue', 'new_','open_', 'close_issue', 'new_group ', 'rm_group', 'rm_', 'do ', 'info','make','add_repo',
|
14
|
-
'add_group','rm_repository ', 'add_people_info ', 'private ', 'people info '].sort
|
14
|
+
'add_group','rm_repository ', 'add_people_info ', 'private ', 'people info ', 'add_issue_comment '].sort
|
15
15
|
|
16
16
|
def initialize()
|
17
17
|
@memory=[]
|
data/lib/interface.rb
CHANGED
@@ -34,22 +34,22 @@ class Interface
|
|
34
34
|
@repo_path=''
|
35
35
|
|
36
36
|
options=@sysbh.parse
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
37
|
+
|
38
|
+
trap("SIGINT") { throw :ctrl_c }
|
39
|
+
catch :ctrl_c do
|
40
|
+
begin
|
41
41
|
if options[:user]==nil && options[:token]==nil && options[:path]!=nil
|
42
42
|
self.run(options[:path],options[:token],options[:user])
|
43
43
|
else
|
44
44
|
self.run("#{ENV['HOME']}/.ghedsh",options[:token],options[:user])
|
45
45
|
end
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
46
|
+
rescue SystemExit, Interrupt
|
47
|
+
raise
|
48
|
+
rescue Exception => e
|
49
|
+
puts "exit"
|
50
|
+
puts e
|
51
|
+
end
|
52
|
+
end
|
53
53
|
end
|
54
54
|
|
55
55
|
def prompt()
|
@@ -583,6 +583,11 @@ class Interface
|
|
583
583
|
r.create_issue(@client,@config,@deep)
|
584
584
|
end
|
585
585
|
end
|
586
|
+
if opcd[0]=="add_issue_comment" and opcd.size==2
|
587
|
+
if @deep==ORGS_REPO || @deep==USER_REPO || @deep==TEAM_REPO
|
588
|
+
r.add_issue_cm(@client,@config,@deep,opcd[1])
|
589
|
+
end
|
590
|
+
end
|
586
591
|
if opcd[0]=="close_issue" and opcd.size==2
|
587
592
|
if @deep==ORGS_REPO || @deep==USER_REPO || @deep==TEAM_REPO
|
588
593
|
r.close_issue(@client,@config,@deep,opcd[1])
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ghedsh
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.27
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Javier Clemente
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-02-
|
12
|
+
date: 2017-02-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: octokit
|