ghedsh 1.1.38 → 1.1.39
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/actions/orgs.rb +18 -7
- data/lib/actions/repo.rb +17 -7
- data/lib/interface.rb +4 -0
- 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: c81ab0cbd1e2dd44e2aa3679176b5ae079e9bddc
|
4
|
+
data.tar.gz: ba021c28e9f2a32a5aea738e36c84bd525005391
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f2859e405ac8e55bba00e33c01882c9e882fd77aad735aa08a1b25dce34584dc7e4a21d7eca578c0853c0aa99fd8cb727d72ee8084c4c05f2bf54123d417bf5
|
7
|
+
data.tar.gz: a843631878ec2a7eb2d572403186df56f30b63f5c0bc473b34fe78f160228d753885b7c09eb0069f2c283e4e97892da0b0d0dc1467cc71dcdd622be02a06efd8
|
data/lib/actions/orgs.rb
CHANGED
@@ -6,7 +6,7 @@ require 'require_all'
|
|
6
6
|
require_rel '.'
|
7
7
|
require 'readline'
|
8
8
|
|
9
|
-
GITHUB_LIST=['githubid','idgithub','github_id','id_github','githubuser','github_user']
|
9
|
+
GITHUB_LIST=['githubid','github','idgithub','github_id','id_github','githubuser','github_user']
|
10
10
|
MAIL_LIST=['email','mail','e-mail']
|
11
11
|
|
12
12
|
class Organizations
|
@@ -487,6 +487,8 @@ class Organizations
|
|
487
487
|
list=self.load_people()
|
488
488
|
csvoptions={:quote_char => "|",:headers=>true,:skip_blanks=>true}
|
489
489
|
members=self.get_organization_members(client,config) #members of the organization
|
490
|
+
change=false
|
491
|
+
indexname=""
|
490
492
|
|
491
493
|
inpeople=list["orgs"].detect{|aux| aux["name"]==config["Org"]}
|
492
494
|
if inpeople==nil
|
@@ -515,29 +517,38 @@ class Organizations
|
|
515
517
|
fields.each do |j|
|
516
518
|
if i[j]!=nil
|
517
519
|
if GITHUB_LIST.include?(j.gsub("\"", "").downcase.strip)
|
518
|
-
|
520
|
+
data=i[j]
|
521
|
+
data=data.gsub("\"", "")
|
522
|
+
aux["github"]=data
|
519
523
|
j="github"
|
520
524
|
else
|
521
525
|
if MAIL_LIST.include?(j.gsub("\"", "").downcase.strip)
|
522
526
|
aux["email"]=i[j].gsub("\"", "").strip
|
527
|
+
indexname=j
|
523
528
|
j="email"
|
529
|
+
change=true
|
524
530
|
else
|
525
|
-
|
531
|
+
data=i[j].gsub("\"", "")
|
532
|
+
aux[j.gsub("\"", "").downcase.strip]=data.strip
|
526
533
|
end
|
527
534
|
end
|
528
535
|
else
|
529
|
-
|
536
|
+
data=i[j].gsub("\"", "")
|
537
|
+
aux[j.gsub("\"", "").downcase.strip]=data.strip
|
530
538
|
end
|
531
539
|
end
|
532
540
|
users.push(aux)
|
533
541
|
end
|
534
542
|
## Aqui empiezan las diferenciaa
|
535
543
|
if relation==true
|
536
|
-
|
544
|
+
if change==true
|
545
|
+
fields[fields.index(indexname)]="email"
|
546
|
+
end
|
547
|
+
fields=users[0].keys
|
537
548
|
# if users.keys.include?("github") and users.keys.include?("email") and users.keys.size==2
|
538
549
|
if fields.include?("github") and fields.include?("email") and fields.size==2
|
539
550
|
users.each do |i|
|
540
|
-
if members.include?(i["github"])
|
551
|
+
if members.include?(i["github"].delete("\""))
|
541
552
|
here=list["orgs"].detect{|aux| aux["name"]==config["Org"]}["users"].detect{|aux2| aux2["github"]==i["github"]} #miro si ya esta registrado
|
542
553
|
if here==nil
|
543
554
|
list["orgs"].detect{|aux| aux["name"]==config["Org"]}["users"]<<i
|
@@ -876,7 +887,7 @@ class Organizations
|
|
876
887
|
Sys.new.save_people("#{ENV['HOME']}/.ghedsh",list)
|
877
888
|
puts "Extended information has not been added yet"
|
878
889
|
else
|
879
|
-
if user.downcase.start_with?("/") and user.downcase.
|
890
|
+
if user.downcase.start_with?("/") and user.downcase.count("/")==2
|
880
891
|
sp=user.split('/')
|
881
892
|
exp=Regexp.new(sp[1],sp[2])
|
882
893
|
inuser=Sys.new.search_rexp_peoplehash(list["orgs"].detect{|aux| aux["name"]==config["Org"]}["users"],exp)
|
data/lib/actions/repo.rb
CHANGED
@@ -453,19 +453,21 @@ class Repositories
|
|
453
453
|
case
|
454
454
|
when scope==USER_REPO
|
455
455
|
if config["Repo"].split("/").size == 1
|
456
|
-
mem=client.collaborators(config["User"]+"/"+config["Repo"]
|
456
|
+
mem=client.collaborators(config["User"]+"/"+config["Repo"])
|
457
457
|
else
|
458
|
-
mem=client.collaborators(config["Repo"]
|
458
|
+
mem=client.collaborators(config["Repo"])
|
459
459
|
end
|
460
460
|
when scope==ORGS_REPO || scope==TEAM_REPO
|
461
461
|
mem=client.collaborators(config["Org"]+"/"+config["Repo"])
|
462
462
|
end
|
463
463
|
print " Collaborators\n\n"
|
464
|
-
mem
|
465
|
-
|
466
|
-
|
464
|
+
if mem!=nil
|
465
|
+
mem.each do |i|
|
466
|
+
puts " #{i[:login]}"
|
467
|
+
collalist.push(i[:login])
|
468
|
+
end
|
469
|
+
print "\n"
|
467
470
|
end
|
468
|
-
print "\n"
|
469
471
|
return collalist
|
470
472
|
end
|
471
473
|
|
@@ -599,6 +601,8 @@ class Repositories
|
|
599
601
|
repo=client.repositories()
|
600
602
|
when scope==ORGS
|
601
603
|
repo=client.organization_repositories(config["Org"])
|
604
|
+
when scope==ASSIG
|
605
|
+
repo=client.organization_repositories(config["Org"])
|
602
606
|
when scope==TEAM
|
603
607
|
repo=client.team_repositories(config["TeamID"])
|
604
608
|
end
|
@@ -673,6 +677,12 @@ class Repositories
|
|
673
677
|
@clonedrepos.push("#{config["Org"]}/#{i}")
|
674
678
|
system(command)
|
675
679
|
end
|
680
|
+
when scope==ASSIG
|
681
|
+
list.each do |i|
|
682
|
+
command = "git clone #{web2}#{config["Org"]}/#{i}.git"
|
683
|
+
@clonedrepos.push("#{config["Org"]}/#{i}")
|
684
|
+
system(command)
|
685
|
+
end
|
676
686
|
end
|
677
687
|
self.clonedpush()
|
678
688
|
else
|
@@ -698,7 +708,7 @@ class Repositories
|
|
698
708
|
if files!=[]
|
699
709
|
print "\n"
|
700
710
|
puts files
|
701
|
-
puts "Are gone to be removed (
|
711
|
+
puts "Are gone to be removed (y/N)"
|
702
712
|
op=gets.chomp
|
703
713
|
if op.downcase=="y" || op.downcase=="yes"
|
704
714
|
files.each do |i|
|
data/lib/interface.rb
CHANGED
@@ -735,6 +735,10 @@ class Interface
|
|
735
735
|
if opcd.size==1 && (@deep==USER_REPO || @deep==TEAM_REPO || @deep==ORGS_REPO)
|
736
736
|
r.clone_repo(@client,@config,nil,@deep)
|
737
737
|
end
|
738
|
+
if opcd.size==1 && deep==ASSIG
|
739
|
+
r.clone_repo(@client,@config,"/#{@config["Assig"]}/",@deep)
|
740
|
+
puts "/#{@config["Assig"]}/"
|
741
|
+
end
|
738
742
|
end
|
739
743
|
if op.match(/^!/)
|
740
744
|
op=op.split("!")
|
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.39
|
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-06-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: octokit
|