You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by cl...@apache.org on 2018/01/09 00:00:21 UTC
[whimsy] branch master updated: Fix typo -rm instead of --rm;
only remove from LDAP if not in committee-info
This is an automated email from the ASF dual-hosted git repository.
clr 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 4ded0cb Fix typo -rm instead of --rm; only remove from LDAP if not in committee-info
4ded0cb is described below
commit 4ded0cba211d7ddef649a4ecadc851fd80e75f8c
Author: Craig L Russell <cr...@oracle.com>
AuthorDate: Mon Jan 8 15:58:33 2018 -0800
Fix typo -rm instead of --rm; only remove from LDAP if not in committee-info
---
tools/modify_pmcchairs.rb | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/tools/modify_pmcchairs.rb b/tools/modify_pmcchairs.rb
index 96f3cc1..4316509 100755
--- a/tools/modify_pmcchairs.rb
+++ b/tools/modify_pmcchairs.rb
@@ -24,11 +24,16 @@ end
# get the list from LDAP to be updated
chairs = ASF::Service.find('pmc-chairs')
+# get the list of current chairs from committee-info
+current = ASF::Committee.pmcs.map(&:chair).uniq
+# only remove people from LDAP who are not currently chairs
+to_be_removed = people.reject{|p| current.include?(p)}
+
# execute the action
if action == '--add' and not people.empty?
ASF::LDAP.bind { chairs.add(people) }
-elsif action == '-rm' and not people.empty?
- ASF::LDAP.bind { chairs.remove(people) }
+elsif action == '--rm' and not to_be_removed.empty?
+ ASF::LDAP.bind { chairs.remove(to_be_removed) }
else
STDERR.puts "Usage: #{$PROGRAM_NAME} (--add|--rm) list..."
end
--
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <co...@whimsical.apache.org>'].