You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by ru...@apache.org on 2018/05/21 22:16:39 UTC

[whimsy] branch master updated: select latest minutes (not agenda); match people by name (not id)

This is an automated email from the ASF dual-hosted git repository.

rubys 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 cdf6146  select latest minutes (not agenda); match people by name (not id)
cdf6146 is described below

commit cdf61463546eb8f0a33924b9bbb9b5fd752f4da7
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Mon May 21 18:16:11 2018 -0400

    select latest minutes (not agenda); match people by name (not id)
---
 www/board/agenda/views/committers_report.text.rb | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/www/board/agenda/views/committers_report.text.rb b/www/board/agenda/views/committers_report.text.rb
index 358a7bc..50d5906 100644
--- a/www/board/agenda/views/committers_report.text.rb
+++ b/www/board/agenda/views/committers_report.text.rb
@@ -18,20 +18,22 @@ end
 
 # load agenda and minutes
 board_svn = ASF::SVN['foundation_board']
-agenda_file = Dir[File.join(board_svn, 'board_agenda_*.txt')].last.untaint
-minutes_file = File.join(AGENDA_WORK, File.basename(agenda_file).
-  sub('_agenda_', '_minutes_').sub('.txt', '.yml'))
+minutes_file = Dir[File.join(AGENDA_WORK, 'board_minutes_*.yml')].sort.
+  last.untaint
+agenda_file = File.join(board_svn, File.basename(minutes_file).
+  sub('_minutes_', '_agenda_').sub('.yml', '.txt'))
 minutes = YAML.load_file(minutes_file)
 agenda = Agenda.parse(File.basename(agenda_file), :quick)
 
 # extract attendance from minutes and people from agenda
 attendance = minutes['attendance'].select {|name, info| info[:present]}.
   sort_by {|name, info| info[:sortName]}
-people = agenda[1]['people']
+people = agenda[1]['people'].values
 
 # merge role from agenda into attendance
 attendance.each do |name, info|
-  info[:role] = (people[info[:id]] || {role: :guest})[:role]
+  person = people.find {|person| person[:name] == name}
+  info[:role] = person ? person[:role] : :guest
 end
 
 # group attendance by role (directors, officers, guests)

-- 
To stop receiving notification emails like this one, please contact
rubys@apache.org.