[whimsy] branch master updated: Allow for forced emeritus people

2020-05-28 Thread sebb
This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
 new b9340cb  Allow for forced emeritus people
b9340cb is described below

commit b9340cbe6c96cfde219d606d935299fd47ce8b82
Author: Sebb 
AuthorDate: Thu May 28 23:40:38 2020 +0100

Allow for forced emeritus people
---
 repository.yml   |  6 ++
 www/secretary/emeritus_check.cgi | 16 
 2 files changed, 22 insertions(+)

diff --git a/repository.yml b/repository.yml
index 5882ee7..74f2e3d 100644
--- a/repository.yml
+++ b/repository.yml
@@ -83,6 +83,12 @@
 depth: delete
 list: true
 
+  emeritus-involuntary:
+url: private/documents
+depth: empty
+files:
+  - emeritus-involuntary.yml
+
   emeritus-requests-received:
 url: private/documents/emeritus-requests-received
 depth: delete
diff --git a/www/secretary/emeritus_check.cgi b/www/secretary/emeritus_check.cgi
index ed10124..86aa16a 100755
--- a/www/secretary/emeritus_check.cgi
+++ b/www/secretary/emeritus_check.cgi
@@ -10,6 +10,11 @@ $LOAD_PATH.unshift '/srv/whimsy/lib'
 require 'whimsy/asf'
 require 'whimsy/asf/memapps'
 require 'wunderbar'
+require 'yaml'
+
+file = 
File.join(ASF::SVN.find!('emeritus-involuntary'),'emeritus-involuntary.yml')
+forced = Set.new
+YAML.load_file(file).each{|k,v| v.each{|w| forced.add w}}
 
 exmembers = ASF::Member.emeritus.map {|id| ASF::Person.find(id)}
 ASF::Person.preload(['cn'], exmembers) # speed up
@@ -61,6 +66,9 @@ _table_ do
   end
   nofiles.sort_by{|k,v| v.member_name}.each do |k,v|
 person = v
+if forced.delete? person.member_name
+  next
+end
 _tr do
   _td do
 _a k, href: "https://whimsy.apache.org/roster/committer/#{k};, target: 
'_blank'
@@ -84,5 +92,13 @@ _table_ do
   end
 end
 
+  if forced.size > 0
+_h2 'Files in emeritus-involuntary.yml that do not match any ASF emeritus 
member names'
+_ul do
+  forced.each do |n|
+_li n
+  end
+end
+  end
 
 end



[whimsy] branch master updated: Don't overwrite cn if Public Name is empty

2020-05-28 Thread sebb
This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
 new 50f7fd3  Don't overwrite cn if Public Name is empty
50f7fd3 is described below

commit 50f7fd34efea05593f71c6432d8289c0389345d6
Author: Sebb 
AuthorDate: Thu May 28 13:20:19 2020 +0100

Don't overwrite cn if Public Name is empty
---
 www/roster/views/actions/fullname.json.rb | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/www/roster/views/actions/fullname.json.rb 
b/www/roster/views/actions/fullname.json.rb
index 09ddb08..7459780 100644
--- a/www/roster/views/actions/fullname.json.rb
+++ b/www/roster/views/actions/fullname.json.rb
@@ -8,7 +8,8 @@ person = ASF::Person.find(@userid)
 
 mods={} # collect the changes
 
-if @publicname and person.attrs['cn'].first != @publicname
+# TODO should the code force 'cn' to be the same as @publicname?
+if @publicname and @publicname != '' and person.attrs['cn'].first != 
@publicname
   mods['cn'] = @publicname
 end
 
@@ -27,7 +28,7 @@ end
 
 # report the previous value in the response
 _previous({
-  publicname: person.attrs['cn'], 
+  commonname: person.attrs['cn'],
   givenname: person.attrs['givenName'],
   familyname: person.attrs['sn']
 })
@@ -39,7 +40,7 @@ else
 _ldap.update do
   # report the previous value in the response
   _previous({
-publicname: person.attrs['cn'], 
+commonname: person.attrs['cn'],
 givenname: person.attrs['givenName'],
 familyname: person.attrs['sn']
   })



[whimsy] branch master updated: Avoid failure if uid has no ICLA

2020-05-28 Thread sebb
This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
 new 1eccd1f  Avoid failure if uid has no ICLA
1eccd1f is described below

commit 1eccd1fe19bc93a83eaea36cf5a59bd4c000d4b5
Author: Sebb 
AuthorDate: Thu May 28 12:41:49 2020 +0100

Avoid failure if uid has no ICLA
---
 www/roster/views/actions/fullname.json.rb | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/www/roster/views/actions/fullname.json.rb 
b/www/roster/views/actions/fullname.json.rb
index 0a71328..09ddb08 100644
--- a/www/roster/views/actions/fullname.json.rb
+++ b/www/roster/views/actions/fullname.json.rb
@@ -77,8 +77,10 @@ if message
 end
 
 # update cache
-person.icla.legal_name = @legalname
-person.icla.name = @publicname
+if person.icla
+  person.icla.legal_name = @legalname
+  person.icla.name = @publicname
+end
 
 # return updated committer info
 _committer Committer.serialize(@userid, env)



[whimsy] branch master updated: Might be plural

2020-05-28 Thread sebb
This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
 new ec700fa  Might be plural
ec700fa is described below

commit ec700fab35734f483c66dffd91e9eeea7cac6ac6
Author: Sebb 
AuthorDate: Thu May 28 12:03:33 2020 +0100

Might be plural
---
 tools/download_check.rb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/download_check.rb b/tools/download_check.rb
index e9ac4ee..9da3499 100755
--- a/tools/download_check.rb
+++ b/tools/download_check.rb
@@ -272,6 +272,7 @@ ALIASES = {
 'signature' => 'asc',
 'ascsignature' => 'asc',
 'pgpsignature' => 'asc',
+'pgpsignatures' => 'asc',
 'gpgsignature' => 'asc',
 'openpgpsignature' => 'asc',
 }



[whimsy] branch master updated: Avoid failure if uid has no ICLA

2020-05-28 Thread sebb
This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
 new a6be0b5  Avoid failure if uid has no ICLA
a6be0b5 is described below

commit a6be0b5a20422810df7f3cae3870c12c3b50a67f
Author: Sebb 
AuthorDate: Thu May 28 12:02:41 2020 +0100

Avoid failure if uid has no ICLA
---
 www/roster/views/actions/fullname.json.rb | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/www/roster/views/actions/fullname.json.rb 
b/www/roster/views/actions/fullname.json.rb
index 84f7d2e..0a71328 100644
--- a/www/roster/views/actions/fullname.json.rb
+++ b/www/roster/views/actions/fullname.json.rb
@@ -50,17 +50,17 @@ else
   end
 end
 
-# determine commit message
-if person.icla.legal_name != @legalname
+# determine commit message for updating iclas.txt
+if person.icla && person.icla.legal_name != @legalname
   if person.icla.name != @publicname
 message = "Update legal and public name for #{@userid}"
   else
 message = "Update legal name for #{@userid}"
   end
-elsif person.icla.name != @publicname
+elsif person.icla && person.icla.name != @publicname
   message = "Update public name for #{@userid}"
 else
-  message = nil
+  message = nil # don't update iclas.txt
 end
 
 # update iclas.txt