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 ec33ada1 Check for duplicates
ec33ada1 is described below
commit ec33ada11b123707b77b0c06820aedff2fc5f0fc
Author: Sebb <[email protected]>
AuthorDate: Fri Jul 19 21:24:35 2024 +0100
Check for duplicates
---
lib/whimsy/asf/committee.rb | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/lib/whimsy/asf/committee.rb b/lib/whimsy/asf/committee.rb
index f5c0a8d8..f39ac968 100644
--- a/lib/whimsy/asf/committee.rb
+++ b/lib/whimsy/asf/committee.rb
@@ -526,7 +526,7 @@ module ASF
# Now weed out the malformed lines
m = line.match(/^[ \t]+(\w.*?)[ \t][ \t]+(.*)[
\t]+<(.*?)@apache\.org>/)
if m
- committee, name, id = m.captures
+ committee, name, id = m.captures # committee may not be canonical
here
unless list[committee].chairs.any? {|chair| chair[:id] == id}
list[committee].chairs << {name: name, id: id}
end
@@ -535,6 +535,11 @@ module ASF
Wunderbar.warn "Missing separator before chair name in: '#{line}'"
end
end
+ # Any duplicates?
+ dupes = list.group_by{|x| x.first.downcase}.select{|k,v|v.size!=1}
+ if dupes.size > 0
+ Wunderbar.warn "Dulicate chairs: #{dupes}}"
+ end
# Extract the non-PMC committees (e-mail address may be absent)
# first drop leading text (and Officers) so we only match non-PMCs
nonpmcs = head.sub(/.*?also has /m, '').sub(/ Officers:.*/m, '').