whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject [whimsy] branch master updated: svn up tlpreq and check before adding
Date Sun, 31 Jul 2016 20:26:38 GMT
This is an automated email from the ASF dual-hosted git repository.

rubys pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/whimsy.git

The following commit(s) were added to refs/heads/master by this push:
       new  699dcac   svn up tlpreq and check before adding
699dcac is described below

commit 699dcaca37282cbe82baf0e0efc40ef3c3113c51
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Sun Jul 31 16:24:46 2016 -0400

    svn up tlpreq and check before adding
    
    Fixes problems where:
    
    1) PMC still listed on the TODO list even after being added to tlpreq
    
    2) LDAP returns back an error when attempting to add a duplicate definition
---
 www/board/agenda/views/actions/todos.json.rb | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/www/board/agenda/views/actions/todos.json.rb b/www/board/agenda/views/actions/todos.json.rb
index 893e013..9c529a5 100644
--- a/www/board/agenda/views/actions/todos.json.rb
+++ b/www/board/agenda/views/actions/todos.json.rb
@@ -7,6 +7,7 @@ TLPREQ = '/srv/secretary/tlpreq'
 date = params[:date].gsub('-', '_')
 date.untaint if date =~ /^\d+_\d+_\d+$/
 agenda = "board_agenda_#{date}.txt"
+`svn up #{TLPREQ}`
 victims = Dir["#{TLPREQ}/victims-#{date}.*.txt"].
   map {|name| File.read(name.untaint).lines().map(&:chomp)}.flatten
 
@@ -80,8 +81,14 @@ if @establish and env.password
 
     ASF::LDAP.bind(env.user, env.password) do
       chairs.add [chair] unless chairs.members.include? chair
-      ASF::Group.add(pmc.downcase, members)
-      ASF::Committee.add(pmc.downcase, members)
+
+      if ASF::Group.find(pmc.downcase).members.empty?
+        ASF::Group.add(pmc.downcase, members)
+      end
+
+      if ASF::Committee.find(pmc.downcase).members.empty?
+        ASF::Committee.add(pmc.downcase, members)
+      end
     end 
   end
 

-- 
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <commits@whimsical.apache.org>'].

Mime
View raw message