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 d8c2e0c Tidy up using safe navigation operator (&.)
d8c2e0c is described below
commit d8c2e0c3254101a87226e1dadac0e422f510be54
Author: Sebb <[email protected]>
AuthorDate: Sat Oct 3 14:51:36 2020 +0100
Tidy up using safe navigation operator (&.)
---
tools/agenda_summary.rb | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/tools/agenda_summary.rb b/tools/agenda_summary.rb
index 19d8389..a45b530 100755
--- a/tools/agenda_summary.rb
+++ b/tools/agenda_summary.rb
@@ -16,20 +16,16 @@ STATS_ROLLUP = 'stats'
def summarize_all(dir = BOARD)
summaries = Hash.new{|h,k| h[k] = {} }
Dir[File.join(dir, 'archived_agendas', "board_agenda_2*.txt")].sort.each do
|f|
- summaries[File.basename(f, '.*')] = ASF::Board::Agenda.summarize(f)
+ summaries[File.basename(f, '.*')] = ASF::Board::Agenda.summarize(f)
end
allpmcs = Set.new()
allpeople = Set.new()
- summaries.each do |month, summary|
- if summary['pmcs']
- summary['pmcs'].each do |title, data|
- allpmcs << title
- end
+ summaries.each do |_month, summary|
+ summary['pmcs']&.each do |title, _data|
+ allpmcs << title
end
- if summary['people']
- summary['people'].each do |id, pers|
- allpeople << pers[:name] # Note: some keys are symbols from
ASF::Board::Agenda.parse
- end
+ summary['people']&.each do |_id, pers|
+ allpeople << pers[:name] # Note: some keys are symbols from
ASF::Board::Agenda.parse
end
end
summaries[STATS_ROLLUP]['allpmcs'] = allpmcs.to_a