ghedsh 1.1.31 → 1.1.32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/actions/help.rb +52 -35
- data/lib/actions/orgs.rb +28 -20
- data/lib/actions/repo.rb +1 -8
- data/lib/actions/system.rb +11 -3
- data/lib/actions/teams.rb +18 -6
- data/lib/actions/user.rb +1 -6
- data/lib/interface.rb +94 -74
- 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: 3e307fb5619bc43c42789ff8071892ba33939698
|
4
|
+
data.tar.gz: 24cdf3be7b778f776e16dd4042300a8d75e4012a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1260c790dd6a4a2adc85d43340ae6cb7054b5debc55a21900c246dd1826c74fd8b3eb778c6159b3cf79632e4e563d59f00a7f44dc546524e1294bbb7fa41f88a
|
7
|
+
data.tar.gz: c741b85b73dc122ea8b27138064025094ab1ea35824cd651ccbcaf5324b81e133aae1e7cb125e6c24448bea7b3686deb7fefa1842226774b3aa862f703d6f065
|
data/lib/actions/help.rb
CHANGED
@@ -14,7 +14,8 @@ class HelpM
|
|
14
14
|
print "\topen\t\t\tOpen the user's url of github in your web browser.\n"
|
15
15
|
print "\trepos\t\t\tList your repositories\n"
|
16
16
|
print "\tclone\t\t\tClone a repository or a list of repositories using a regular expresion\n"
|
17
|
-
print "\
|
17
|
+
print "\tnew repository\t\tCreate a repository in your personal account\n"
|
18
|
+
print "\t\t\t\t->\tnew repository [name of the repository]\n\n"
|
18
19
|
print "\tset\t\t\tMove you to a specific repository\n"
|
19
20
|
|
20
21
|
end
|
@@ -24,6 +25,8 @@ class HelpM
|
|
24
25
|
puts " Organization options:"
|
25
26
|
print "\n\tCOMMAND\t\t\tDESCRIPTION\n\n"
|
26
27
|
print "\trepos\t\t\tList the repositories of your organization\n"
|
28
|
+
print "\tnew repository\t\tCreate a repository in a organization\n"
|
29
|
+
print "\t\t\t\t->\tnew repository [name of the repository]\n\n"
|
27
30
|
print "\topen\t\t\tOpen the organization's url of github in your web browser.\n"
|
28
31
|
print "\t\t\t\tIf you have added the aditional .csv information with, you can open an specific github profile.\n"
|
29
32
|
print "\t\t\t\t->\topen [user]\n\n"
|
@@ -36,22 +39,23 @@ class HelpM
|
|
36
39
|
print "\t\t\t\tTo find a specific member extended info, you can give the github id as parameter.\n"
|
37
40
|
print "\t\t\t\t->\tpeople info [github id]\n\n"
|
38
41
|
print "\tteams\t\t\tTeams of a organization\n"
|
39
|
-
print "\
|
40
|
-
print "\t\t\t\t->\
|
42
|
+
print "\tnew people info\t\tGet extended information from a .csv file founded in the excecute path\n"
|
43
|
+
print "\t\t\t\t->\tnew people info [name of the file]\n\n"
|
41
44
|
print "\trm people info\t\tDelete the extended information\n"
|
42
45
|
print "\tassignments\t\tShow the list of assignments created\n"
|
43
|
-
print "\
|
46
|
+
print "\tnew assignment\t\tCreate an Assignment in your organization\n"
|
47
|
+
print "\t\t\t\t->\tnew assignment [name of the assignment]\n\n"
|
44
48
|
print "\tgroups\t\t\tShow the list of groups with each team and user that it has\n"
|
45
49
|
print "\tgroup\t\t\tShow the information of an specific group\n"
|
46
50
|
print "\t\t\t\t->\tgroup [name of the group]\n\n"
|
47
|
-
print "\
|
48
|
-
print "\t\t\t\t->\
|
49
|
-
print "\
|
50
|
-
print "\t\t\t\t->\
|
51
|
-
print "\
|
52
|
-
print "\t\t\t\t->\
|
53
|
-
print "\
|
54
|
-
print "\t\t\t\t->\
|
51
|
+
print "\tnew group\t\tCreate a new group. Expected the name and teams given one by one\n"
|
52
|
+
print "\t\t\t\t->\tnew group [name of the group] [team1] [team2] [team3] ... \n\n"
|
53
|
+
print "\trm group\t\tDelete a created group\n"
|
54
|
+
print "\t\t\t\t->\trm group [name of the group]\n\n"
|
55
|
+
print "\trm team\t\t\tDelete a team in you organization. Expected the name of the team\n"
|
56
|
+
print "\t\t\t\t->\trm team [name of the team]\n\n"
|
57
|
+
print "\tnew team\t\tCreate a team in the organization. Expected the name of the team, and/or members given one by one\n"
|
58
|
+
print "\t\t\t\t->\tnew team [name of the team] [member1] [member2] [member3] ... \n\n"
|
55
59
|
|
56
60
|
end
|
57
61
|
|
@@ -62,16 +66,16 @@ class HelpM
|
|
62
66
|
print "\tinfo\t\t\tShow information about the repository\n"
|
63
67
|
print "\topen\t\t\tOpen the repository's url of github in your web browser.\n"
|
64
68
|
print "\tcommits\t\t\tShow the list of commits from the repository\n"
|
65
|
-
print "\
|
69
|
+
print "\tnew issue\t\tCreates a new issue\n"
|
66
70
|
print "\tissues\t\t\tShow the list of issues from the repository\n"
|
67
71
|
print "\tissue\t\t\tShow the issue and its comments\n"
|
68
72
|
print "\t\t\t\t->\tissue [Id of the issue]\n\n"
|
69
|
-
print "\
|
70
|
-
print "\t\t\t\t->\
|
71
|
-
print "\
|
72
|
-
print "\t\t\t\t->\
|
73
|
-
print "\
|
74
|
-
print "\t\t\t\t->\
|
73
|
+
print "\tnew issue comment\tAdd a comment in a specific issue\n"
|
74
|
+
print "\t\t\t\t->\tnew issue comment [Id of the issue]\n\n"
|
75
|
+
print "\topen issue\t\tOpen a closed issue\n"
|
76
|
+
print "\t\t\t\t->\topen issue [Id of the issue]\n\n"
|
77
|
+
print "\tclose issue\t\tClose an opened issue\n"
|
78
|
+
print "\t\t\t\t->\tclose issue [Id of the issue]\n\n"
|
75
79
|
print "\tfiles\t\t\tShow the files of the repository path given\n"
|
76
80
|
print "\tcat\t\t\tShow data from a file\n"
|
77
81
|
print "\t\t\t\t->\tcat [file]\n\n"
|
@@ -87,8 +91,10 @@ class HelpM
|
|
87
91
|
print "\tpeople\t\t\tMembers of the team\n"
|
88
92
|
print "\topen\t\t\tOpen the team's url of github in your web browser.\n"
|
89
93
|
print "\tclone\t\t\tClone a repository or a list of repositories using a regular expresion\n"
|
90
|
-
print "\
|
91
|
-
print "\
|
94
|
+
print "\tnew repository\t\tCreate a repository to this team\n"
|
95
|
+
print "\t\t\t\t->\tnew repository [name]\n\n"
|
96
|
+
print "\tadd team member\t\tAdd a member in the team\n\n"
|
97
|
+
print "\t\t\t\t->\tadd team member [new member]\n\n"
|
92
98
|
end
|
93
99
|
|
94
100
|
def user_repo()
|
@@ -98,16 +104,16 @@ class HelpM
|
|
98
104
|
print "\tinfo\t\t\tShow information about the repository\n"
|
99
105
|
print "\topen\t\t\tOpen the repository's url of github in your web browser.\n"
|
100
106
|
print "\tcommits\t\t\tShow the list of commits from the repository\n"
|
101
|
-
print "\
|
107
|
+
print "\tnew issue\t\tCreates a new issue\n"
|
102
108
|
print "\tissues\t\t\tShow the list of issues from the repository\n"
|
103
109
|
print "\tissue\t\t\tShow the issue and its comments\n"
|
104
110
|
print "\t\t\t\t->\tissue [Id of the issue]\n\n"
|
105
|
-
print "\
|
106
|
-
print "\t\t\t\->\
|
107
|
-
print "\
|
108
|
-
print "\t\t\t\t->\
|
109
|
-
print "\
|
110
|
-
print "\t\t\t\t->\
|
111
|
+
print "\tnew issue comment\tAdd a comment in a specific issue\n"
|
112
|
+
print "\t\t\t\->\tnew issue comment [Id of the issue]\n\n"
|
113
|
+
print "\topen issue\t\tOpen a closed issue\n"
|
114
|
+
print "\t\t\t\t->\topen issue [Id of the issue]\n\n"
|
115
|
+
print "\tclose issue\t\tClose an opened issue\n"
|
116
|
+
print "\t\t\t\t->\tclose issue [Id of the issue]\n\n"
|
111
117
|
print "\tfiles\t\t\tShow the files of the repository path given\n"
|
112
118
|
print "\tcat\t\t\tShow data from a file\n"
|
113
119
|
print "\t\t\t\t->\tcat [file]\n\n"
|
@@ -116,6 +122,17 @@ class HelpM
|
|
116
122
|
print "\topen\t\t\tOpen the repository's url of github in your web browser.\n"
|
117
123
|
print "\tcol\t\t\tShow the list of collaborators from the repository\n\n"
|
118
124
|
end
|
125
|
+
|
126
|
+
def asssig()
|
127
|
+
self.common_opt
|
128
|
+
puts " Assignment options:"
|
129
|
+
print "\n\tCOMMAND\t\t\tDESCRIPTION\n\n"
|
130
|
+
print "\tinfo\t\t\Show information about the assignment\n"
|
131
|
+
print "\tadd repo\t\tAdd or create the repository of the assignment\n"
|
132
|
+
print "\tadd group\t\tAdd a new group to the assignment\n"
|
133
|
+
print "\tmake\t\t\tCreate the repository assignment in Github for each team of every group\n\n"
|
134
|
+
end
|
135
|
+
|
119
136
|
def team_repo()
|
120
137
|
self.common_opt
|
121
138
|
puts " Repository options:"
|
@@ -123,16 +140,16 @@ class HelpM
|
|
123
140
|
print "\tinfo\t\t\tShow information about the repository\n"
|
124
141
|
print "\topen\t\t\tOpen the repository's url of github in your web browser.\n"
|
125
142
|
print "\tcommits\t\t\tShow the list of commits from the repository\n"
|
126
|
-
print "\
|
143
|
+
print "\tnew issue\t\tCreates a new issue\n"
|
127
144
|
print "\tissues\t\t\tShow the list of issues from the repository\n"
|
128
145
|
print "\tissue\t\t\tShow the issue and its comments\n"
|
129
|
-
print "\
|
130
|
-
print "\t\t\t\t->\
|
146
|
+
print "\tnew issue comment\tAdd a comment in a specific issue\n"
|
147
|
+
print "\t\t\t\t->\tnew issue comment [Id of the issue]\n\n"
|
131
148
|
print "\t\t\t\t->\tissue [Id of the issue]\n\n"
|
132
|
-
print "\
|
133
|
-
print "\t\t\t\t->\
|
134
|
-
print "\
|
135
|
-
print "\t\t\t\t->\
|
149
|
+
print "\topen issue\t\tOpen a closed issue\n"
|
150
|
+
print "\t\t\t\t->\topen issue [Id of the issue]\n\n"
|
151
|
+
print "\tclose issue\t\tClose an opened issue\n"
|
152
|
+
print "\t\t\t\t->\tclose issue [Id of the issue]\n\n"
|
136
153
|
print "\tfiles\t\t\tShow the files of the repository path given\n"
|
137
154
|
print "\tcat\t\t\tShow data from a file\n"
|
138
155
|
print "\t\t\t\t->\tcat [file]\n\n"
|
data/lib/actions/orgs.rb
CHANGED
@@ -289,7 +289,7 @@ class Organizations
|
|
289
289
|
#Takes people info froma a csv file and gets into ghedsh people information
|
290
290
|
def add_people_info(client,config,file)
|
291
291
|
list=self.load_people()
|
292
|
-
csvoptions={:quote_char => "|",:headers=>true}
|
292
|
+
csvoptions={:quote_char => "|",:headers=>true,:skip_blanks=>true}
|
293
293
|
members=self.get_organization_members(client,config) #members of the organization
|
294
294
|
|
295
295
|
inpeople=list["orgs"].detect{|aux| aux["name"]==config["Org"]}
|
@@ -366,7 +366,7 @@ class Organizations
|
|
366
366
|
end
|
367
367
|
end
|
368
368
|
else
|
369
|
-
puts "#{i["github"]} is not registered in this
|
369
|
+
puts "#{i["github"]} is not registered in this organization"
|
370
370
|
end
|
371
371
|
end
|
372
372
|
Sys.new.save_people("#{ENV['HOME']}/.ghedsh",list)
|
@@ -496,18 +496,14 @@ class Organizations
|
|
496
496
|
|
497
497
|
def open_org(client,config)
|
498
498
|
mem=client.organization(config["Org"])
|
499
|
-
|
500
|
-
when RUBY_PLATFORM.downcase.include?("darwin")
|
501
|
-
system("open #{mem[:html_url]}")
|
502
|
-
when RUBY_PLATFORM.downcase.include?("linux")
|
503
|
-
system("xdg-open #{mem[:html_url]}")
|
504
|
-
end
|
499
|
+
Sys.new.open_url(mem[:html_url])
|
505
500
|
end
|
506
501
|
|
507
|
-
def open_user_url(client,config,user)
|
502
|
+
def open_user_url(client,config,user,field)
|
508
503
|
list=self.load_people()
|
509
504
|
inpeople=list["orgs"].detect{|aux| aux["name"]==config["Org"]}
|
510
505
|
found=0
|
506
|
+
|
511
507
|
if inpeople==nil
|
512
508
|
list["orgs"].push({"name"=>config["Org"],"users"=>[]})
|
513
509
|
Sys.new.save_people("#{ENV['HOME']}/.ghedsh",list)
|
@@ -517,19 +513,31 @@ class Organizations
|
|
517
513
|
if inuser==nil
|
518
514
|
puts "Not extended information has been added of that user."
|
519
515
|
else
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
516
|
+
if field==nil
|
517
|
+
inuser.each_value do |j|
|
518
|
+
if j.include?("github.com")
|
519
|
+
if j.include?("https://")==false || j.include?("http://")==false
|
520
|
+
Sys.new.open_url("http://"+j)
|
521
|
+
else
|
522
|
+
Sys.new.open_url(j)
|
523
|
+
end
|
524
|
+
found=1
|
527
525
|
end
|
528
|
-
found=1
|
529
526
|
end
|
530
|
-
|
531
|
-
|
532
|
-
|
527
|
+
if found==0
|
528
|
+
puts "No github web profile in the aditional information"
|
529
|
+
end
|
530
|
+
else
|
531
|
+
if inuser.keys.include?(field.downcase)
|
532
|
+
if inuser[field.downcase].include?("https://")==false || inuser[field.downcase].include?("http://")==false
|
533
|
+
url="http://"+inuser["#{field.downcase}"]
|
534
|
+
else
|
535
|
+
url=inuser["#{field.downcase}"]
|
536
|
+
end
|
537
|
+
Sys.new.open_url(url)
|
538
|
+
else
|
539
|
+
puts "No field found with that name"
|
540
|
+
end
|
533
541
|
end
|
534
542
|
end
|
535
543
|
end
|
data/lib/actions/repo.rb
CHANGED
@@ -81,14 +81,7 @@ class Repositories
|
|
81
81
|
when scope==ORGS_REPO || scope==TEAM_REPO
|
82
82
|
mem=client.repository(config["Org"]+"/"+config["Repo"])
|
83
83
|
end
|
84
|
-
|
85
|
-
case
|
86
|
-
when RUBY_PLATFORM.downcase.include?("darwin")
|
87
|
-
system("open #{mem[:html_url]}")
|
88
|
-
when RUBY_PLATFORM.downcase.include?("linux")
|
89
|
-
system("xdg-open #{mem[:html_url]}")
|
90
|
-
end
|
91
|
-
|
84
|
+
Sys.new.open_url(mem[:html_url])
|
92
85
|
end
|
93
86
|
|
94
87
|
def create_issue(client,config,scope,path)
|
data/lib/actions/system.rb
CHANGED
@@ -9,9 +9,9 @@ require 'version'
|
|
9
9
|
class Sys
|
10
10
|
attr_reader :client
|
11
11
|
attr_reader :memory
|
12
|
-
LIST = ['repos', 'exit', 'orgs','help', 'people','teams', 'cd ', 'cd repo ','commits','forks', 'add_team_member ','
|
13
|
-
'version', 'cat ', 'groups', 'files', 'assignments','
|
14
|
-
'
|
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
|
+
'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 ', 'new people info ', 'private ', 'people info ', 'new issue comment ', "rm people info"].sort
|
15
15
|
|
16
16
|
def initialize()
|
17
17
|
@memory=[]
|
@@ -399,4 +399,12 @@ class Sys
|
|
399
399
|
end
|
400
400
|
end
|
401
401
|
|
402
|
+
def open_url(url)
|
403
|
+
case
|
404
|
+
when RUBY_PLATFORM.downcase.include?("darwin")
|
405
|
+
system("open #{url}")
|
406
|
+
when RUBY_PLATFORM.downcase.include?("linux")
|
407
|
+
system("xdg-open #{url}")
|
408
|
+
end
|
409
|
+
end
|
402
410
|
end
|
data/lib/actions/teams.rb
CHANGED
@@ -29,16 +29,24 @@ class Teams
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def create_team(client,config,name)
|
32
|
-
|
32
|
+
begin
|
33
|
+
client.create_team(config["Org"],{:name=>name,:permission=>'push'})
|
34
|
+
rescue
|
35
|
+
puts "Already exists a team with that name"
|
36
|
+
end
|
33
37
|
end
|
34
38
|
|
35
39
|
def create_team_with_members(client,config,name,members)
|
36
40
|
t=self.create_team(client,config,name)
|
37
|
-
|
41
|
+
if t!=nil
|
42
|
+
config["TeamID"]=t[:id]
|
38
43
|
|
39
|
-
|
40
|
-
|
41
|
-
|
44
|
+
for i in 0..members.size
|
45
|
+
if client.organization_member?(config["Org"],members[i])
|
46
|
+
self.add_to_team(client,config,members[i])
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
42
50
|
end
|
43
51
|
|
44
52
|
def add_to_team(client,config,path)
|
@@ -131,7 +139,11 @@ class Teams
|
|
131
139
|
list=sys.load_groups("#{ENV['HOME']}/.ghedsh")
|
132
140
|
w=list["orgs"].detect{|aux| aux["name"]==config["Org"]}
|
133
141
|
w=w["groups"].detect{|aux| aux["name_group"]==wanted}
|
134
|
-
|
142
|
+
if w!=nil
|
143
|
+
return w["teams"]
|
144
|
+
else
|
145
|
+
return nil
|
146
|
+
end
|
135
147
|
end
|
136
148
|
|
137
149
|
def new_group(client,config,name,listgroups)
|
data/lib/actions/user.rb
CHANGED
@@ -14,11 +14,6 @@ class User
|
|
14
14
|
|
15
15
|
def open_user(client)
|
16
16
|
mem=client.user(client.login)
|
17
|
-
|
18
|
-
when RUBY_PLATFORM.downcase.include?("darwin")
|
19
|
-
system("open #{mem[:html_url]}")
|
20
|
-
when RUBY_PLATFORM.downcase.include?("linux")
|
21
|
-
system("xdg-open #{mem[:html_url]}")
|
22
|
-
end
|
17
|
+
Sys.new.open_url(mem[:html_url])
|
23
18
|
end
|
24
19
|
end
|
data/lib/interface.rb
CHANGED
@@ -94,6 +94,8 @@ class Interface
|
|
94
94
|
h.orgs_teams()
|
95
95
|
when @deep == TEAM_REPO
|
96
96
|
h.team_repo()
|
97
|
+
when @deep == ASSIG
|
98
|
+
h.asssig()
|
97
99
|
end
|
98
100
|
end
|
99
101
|
|
@@ -504,24 +506,105 @@ class Interface
|
|
504
506
|
end
|
505
507
|
when op.include?("group") && opcd[0]=="group"
|
506
508
|
if opcd.size==2
|
507
|
-
|
508
|
-
|
509
|
+
teams=t.get_single_group(@config,opcd[1])
|
510
|
+
if teams!=nil
|
511
|
+
puts "Teams in group #{opcd[1]} :"
|
512
|
+
puts teams
|
513
|
+
else
|
514
|
+
puts "Group not found"
|
515
|
+
end
|
516
|
+
end
|
517
|
+
when op.include?("new") && opcd[0]=="new" && opcd[1]=="team" #new's parse
|
518
|
+
if opcd.size==3 and @deep==ORGS
|
519
|
+
t.create_team(@client,@config,opcd[2])
|
520
|
+
@teamlist=t.read_teamlist(@client,@config)
|
521
|
+
@sysbh.add_history_str(1,@teamlist)
|
522
|
+
end
|
523
|
+
if opcd.size>3 and @deep==ORGS
|
524
|
+
t.create_team_with_members(@client,@config,opcd[2],opcd[3..opcd.size])
|
525
|
+
@teamlist=t.read_teamlist(@client,@config)
|
526
|
+
@sysbh.add_history_str(1,@teamlist)
|
527
|
+
end
|
528
|
+
when op.include?("new") && op.include?("comment")==false && opcd[0]=="new" && opcd[1]=="issue"
|
529
|
+
if opcd.size==2 and (@deep==ORGS_REPO || @deep==USER_REPO || @deep==TEAM_REPO)
|
530
|
+
r.create_issue(@client,@config,@deep,config_path)
|
531
|
+
end
|
532
|
+
when op.include?("new") && (opcd[0]=="new" && opcd[1]=="issue" && opcd[2]=="comment")
|
533
|
+
if opcd.size==4 and (@deep==ORGS_REPO || @deep==USER_REPO || @deep==TEAM_REPO)
|
534
|
+
r.add_issue_cm(@client,@config,@deep,opcd[3],config_path)
|
509
535
|
end
|
510
536
|
when op.include?("new") && opcd[0]=="new" && opcd[1]=="people" && opcd[2]=="info"
|
511
537
|
if @deep==ORGS && opcd.size==4 then o.add_people_info(@client,@config,opcd[3]) end
|
538
|
+
when op.include?("new") && opcd[0]=="new" && opcd[1]=="repository"
|
539
|
+
if opcd.size==3
|
540
|
+
r.create_repository(@client,@config,opcd[2],false,@deep)
|
541
|
+
end
|
542
|
+
when op.include?("new assignment") && opcd[0]=="new" && opcd[1]="assignment"
|
543
|
+
if opcd.size==3 and @deep==ORGS
|
544
|
+
r.create_repository_by_teamlist(@client,@config,opcd[2],opcd[3,opcd.size],self.get_teamlist(opcd[3,opcd.size]))
|
545
|
+
o.create_assig(@client,@config,opcd[2])
|
546
|
+
@sysbh.add_history(opcd[2])
|
547
|
+
end
|
548
|
+
when op.include?("new group") && opcd[0]=="new" && opcd[1]="group"
|
549
|
+
if opcd.size>3 and @deep==ORGS
|
550
|
+
t.new_group(@client,@config,opcd[2],opcd[3..opcd.size-1])
|
551
|
+
end
|
552
|
+
|
553
|
+
when op.include?("rm team") && opcd[0]=="rm" && opcd[1]="team" ##rm parse
|
554
|
+
if opcd.size==3
|
555
|
+
@teamlist=t.read_teamlist(@client,@config)
|
556
|
+
if @teamlist[opcd[2]]!=nil
|
557
|
+
t.delete_team(@client,@teamlist[opcd[2]])
|
558
|
+
@sysbh.quit_history(@teamlist[opcd[2]])
|
559
|
+
@teamlist=t.read_teamlist(@client,@config)
|
560
|
+
@sysbh.add_history_str(1,@teamlist)
|
561
|
+
else
|
562
|
+
puts "Team not found"
|
563
|
+
end
|
564
|
+
end
|
565
|
+
|
566
|
+
when op.include?("rm group") && opcd[0]=="rm" && opcd[1]="group"
|
567
|
+
if opcd.size==3 and @deep==ORGS
|
568
|
+
t.delete_group(@config,opcd[2])
|
569
|
+
end
|
570
|
+
|
571
|
+
when op.include?("rm repository") && opcd[0]=="rm" && opcd[1]="repository"
|
572
|
+
if @deep==ORGS || @deep==USER || @deep==TEAM
|
573
|
+
r.delete_repository(@client,@config,opcd[2],@deep)
|
574
|
+
if @deep==ORGS
|
575
|
+
@orgs_repos.delete(opcd[2])
|
576
|
+
end
|
577
|
+
end
|
578
|
+
|
512
579
|
when op == "info"
|
513
580
|
if @deep==ASSIG then o.show_assig_info(@config,@assig_path) end
|
514
581
|
if @deep==USER_REPO || @deep==TEAM_REPO || @deep==ORGS_REPO then r.info_repository(@client,@config,@deep) end
|
515
|
-
when op== "
|
582
|
+
when op== "add repo"
|
516
583
|
if @deep=ASSIG then o.add_repo_to_assig(@client,@config,@assig_path) end
|
517
584
|
when op.include?("rm")
|
518
585
|
if @deep==ORGS and opcd[1]=="people" and opcd[2]=="info"
|
519
586
|
o.rm_people_info(@client,@config)
|
520
587
|
end
|
521
|
-
when op== "
|
588
|
+
when op== "add group"
|
522
589
|
if @deep=ASSIG then o.add_group_to_assig(@client,@config,@assig_path) end
|
523
590
|
when op == "version"
|
524
591
|
puts "GitHub Education Shell v#{Ghedsh::VERSION}"
|
592
|
+
|
593
|
+
when op.include?("add team member") && opcd[0]=="add" && opcd[1]="team" && opcd[2]="member"
|
594
|
+
if opcd.size==4 and @deep==TEAM
|
595
|
+
t.add_to_team(@client,@config,opcd[3])
|
596
|
+
end
|
597
|
+
|
598
|
+
when op.include?("close issue") && opcd[0]=="close" && opcd[1]="issue"
|
599
|
+
if (@deep==ORGS_REPO || @deep==USER_REPO || @deep==TEAM_REPO) and opcd.size==3
|
600
|
+
r.close_issue(@client,@config,@deep,opcd[2])
|
601
|
+
end
|
602
|
+
|
603
|
+
when op.include?("open issue") && opcd[0]=="open" && opcd[1]="issue"
|
604
|
+
if (@deep==ORGS_REPO || @deep==USER_REPO || @deep==TEAM_REPO) and opcd.size==3
|
605
|
+
r.open_issue(@client,@config,@deep,opcd[2])
|
606
|
+
end
|
607
|
+
|
525
608
|
when op == "assignments"
|
526
609
|
if @deep==ORGS
|
527
610
|
o.show_assignments(@client,@config)
|
@@ -537,7 +620,11 @@ class Interface
|
|
537
620
|
if opcd.size==1
|
538
621
|
o.open_org(@client,@config)
|
539
622
|
else
|
540
|
-
|
623
|
+
if opcd.size==2
|
624
|
+
o.open_user_url(@client,@config,opcd[1],nil)
|
625
|
+
else
|
626
|
+
o.open_user_url(@client,@config,opcd[1],opcd[2])
|
627
|
+
end
|
541
628
|
end
|
542
629
|
end
|
543
630
|
if @deep==TEAM then t.open_team_repos(@config) end
|
@@ -598,80 +685,13 @@ class Interface
|
|
598
685
|
end
|
599
686
|
end
|
600
687
|
end
|
601
|
-
|
602
|
-
t.add_to_team(@client,@config,opcd[1])
|
603
|
-
end
|
604
|
-
if opcd[0]=="new_team" and opcd.size==2
|
605
|
-
t.create_team(@client,@config,opcd[1])
|
606
|
-
@teamlist=t.read_teamlist(@client,@config)
|
607
|
-
@sysbh.add_history_str(1,@teamlist)
|
608
|
-
end
|
609
|
-
if opcd[0]=="new_issue" and opcd.size==1
|
610
|
-
if @deep==ORGS_REPO || @deep==USER_REPO || @deep==TEAM_REPO
|
611
|
-
r.create_issue(@client,@config,@deep,config_path)
|
612
|
-
end
|
613
|
-
end
|
614
|
-
if opcd[0]=="new_issue_comment" and opcd.size==2
|
615
|
-
if @deep==ORGS_REPO || @deep==USER_REPO || @deep==TEAM_REPO
|
616
|
-
r.add_issue_cm(@client,@config,@deep,opcd[1],config_path)
|
617
|
-
end
|
618
|
-
end
|
619
|
-
if opcd[0]=="close_issue" and opcd.size==2
|
620
|
-
if @deep==ORGS_REPO || @deep==USER_REPO || @deep==TEAM_REPO
|
621
|
-
r.close_issue(@client,@config,@deep,opcd[1])
|
622
|
-
end
|
623
|
-
end
|
624
|
-
if opcd[0]=="open_issue" and opcd.size==2
|
625
|
-
if @deep==ORGS_REPO || @deep==USER_REPO || @deep==TEAM_REPO
|
626
|
-
r.open_issue(@client,@config,@deep,opcd[1])
|
627
|
-
end
|
628
|
-
end
|
688
|
+
|
629
689
|
if opcd[0]=="private" and opcd.size==2
|
630
690
|
if opcd[1]=="true" || opcd[1]=="false"
|
631
691
|
r.edit_repository(@client,@config,@deep,opcd[1])
|
632
692
|
end
|
633
693
|
end
|
634
|
-
|
635
|
-
t.delete_team(@client,@teamlist[opcd[1]])
|
636
|
-
self.quit_history(@teamlist[opcd[1]])
|
637
|
-
@teamlist=t.read_teamlist(@client,@config)
|
638
|
-
@sysbh.add_history_str(1,@teamlist)
|
639
|
-
end
|
640
|
-
if opcd[0]=="rm_group" and opcd.size==2
|
641
|
-
if @deep==ORGS
|
642
|
-
t.delete_group(@config,opcd[1])
|
643
|
-
end
|
644
|
-
end
|
645
|
-
if opcd[0]=="rm_repository" and opcd.size==2
|
646
|
-
if @deep==ORGS || @deep==USER || @deep==TEAM
|
647
|
-
r.delete_repository(@client,@config,opcd[1],@deep)
|
648
|
-
if @deep==ORGS
|
649
|
-
@orgs_repos.delete(opcd[1])
|
650
|
-
end
|
651
|
-
end
|
652
|
-
end
|
653
|
-
if opcd[0]=="new_team" and opcd.size>2
|
654
|
-
t.create_team_with_members(@client,@config,opcd[1],opcd[2..opcd.size])
|
655
|
-
@teamlist=t.read_teamlist(@client,@config)
|
656
|
-
@sysbh.add_history_str(1,@teamlist)
|
657
|
-
end
|
658
|
-
if opcd[0]=="new_repository" and opcd.size==2
|
659
|
-
r.create_repository(@client,@config,opcd[1],false,@deep)
|
660
|
-
end
|
661
|
-
if opcd[0]=="new_assignment" and opcd.size>1 #2
|
662
|
-
case
|
663
|
-
when @deep==ORGS
|
664
|
-
#r.create_repository_by_teamlist(@client,@config,opcd[1],opcd[2,opcd.size],self.get_teamlist(opcd[2,opcd.size]))
|
665
|
-
o.create_assig(@client,@config,opcd[1])
|
666
|
-
@sysbh.add_history(opcd[1])
|
667
|
-
end
|
668
|
-
end
|
669
|
-
if opcd[0]=="new_group" and opcd.size>2
|
670
|
-
if @deep==ORGS
|
671
|
-
t.new_group(@client,@config,opcd[1],opcd[2..opcd.size-1])
|
672
|
-
end
|
673
|
-
end
|
674
|
-
if opcd[0]=="new_people_info" and opcd.size==2 and @deep==ORGS then o.add_people_info(@client,@config,opcd[1]) end
|
694
|
+
|
675
695
|
if opcd[0]=="people" and opcd[1]=="info"
|
676
696
|
if opcd.size==2
|
677
697
|
info_strm=o.show_people_info(@client,@config,nil)
|
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.32
|
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-
|
12
|
+
date: 2017-04-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: octokit
|