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 2021/04/22 13:12:56 UTC

[whimsy] branch master updated: handle there only being one agenda in the directory

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 9a65fff  handle there only being one agenda in the directory
9a65fff is described below

commit 9a65fff1d549da06e3961bcd70446eede0e5c207
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Thu Apr 22 09:12:36 2021 -0400

    handle there only being one agenda in the directory
---
 www/board/agenda/views/actions/potential-actions.json.rb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/www/board/agenda/views/actions/potential-actions.json.rb b/www/board/agenda/views/actions/potential-actions.json.rb
index 61bcb78..d709fe1 100644
--- a/www/board/agenda/views/actions/potential-actions.json.rb
+++ b/www/board/agenda/views/actions/potential-actions.json.rb
@@ -3,7 +3,9 @@
 #
 
 # get posted action items from previous report
-base = Dir["#{FOUNDATION_BOARD}/board_agenda_*.txt"].sort[-2]
+today = Date.today.strftime('board_agenda_%Y_%m_%d.txt')
+base = Dir["#{FOUNDATION_BOARD}/board_agenda_*.txt"].
+ select {|file| file < today}.sort.last
 parsed = ASF::Board::Agenda.parse(IO.read(base), true)
 actions = parsed.find {|item| item['title'] == 'Action Items'}['actions']