You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by cu...@apache.org on 2018/03/24 16:43:46 UTC
[whimsy] branch master updated: Fix parse error from before
officers reported to President
This is an automated email from the ASF dual-hosted git repository.
curcuru 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 4bfb254 Fix parse error from before officers reported to President
4bfb254 is described below
commit 4bfb254b0748cf89db44826b7c4342409fba1e8b
Author: Shane Curcuru <as...@shanecurcuru.org>
AuthorDate: Sat Mar 24 12:43:42 2018 -0400
Fix parse error from before officers reported to President
When President report lists attachment, works as expected; before that,
simply ignores associating president reports
---
lib/whimsy/asf/agenda.rb | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lib/whimsy/asf/agenda.rb b/lib/whimsy/asf/agenda.rb
index 1a3f063..bbc96c7 100644
--- a/lib/whimsy/asf/agenda.rb
+++ b/lib/whimsy/asf/agenda.rb
@@ -104,7 +104,9 @@ class ASF::Board::Agenda
president = @sections.values.find {|item| item['title'] == 'President'}
return [] unless president # quick exit if non-standard format agenda
- preports = Range.new(*president['report'][/\d+ through \d+\.$/].scan(/\d+/))
+ pattach = president['report'][/\d+ through \d+\.$/]
+ # pattach is nil before https://whimsy.apache.org/board/minutes/Change_Officers_to_Serve_at_the_Direction_of_the_President.html
+ preports = Range.new(*pattach.scan(/\d+/)) if pattach
# cleanup text and comment whitespace, add flags
@sections.each do |section, hash|
text = hash['text'] || hash['report']
@@ -128,7 +130,7 @@ class ASF::Board::Agenda
hash['flagged_by'] = flags.split(', ') if flags
# mark president reports
- hash['to'] = 'president' if preports.include? section
+ hash['to'] = 'president' if preports && preports.include?(section)
end
unless @quick
--
To stop receiving notification emails like this one, please contact
curcuru@apache.org.