lib/whimsy/asf/agenda.rb in whimsy-asf-0.0.32 vs lib/whimsy/asf/agenda.rb in whimsy-asf-0.0.33
- old
+ new
@@ -71,10 +71,12 @@
# look for flags
flagged_reports = Hash[@file[/ \d\. Committee Reports.*?\n\s+A\./m].
scan(/# (.*?) \[(.*)\]/)]
+ president = @sections.values.find {|item| item['title'] == 'President'}
+ preports = Range.new(*president['report'][/\d+ through \d+\.$/].scan(/\d+/))
# cleanup text and comment whitespace, add flags
@sections.each do |section, hash|
text = hash['text'] || hash['report']
if text
text.sub!(/\A\s*\n/, '')
@@ -92,9 +94,12 @@
end
# add flags
flags = flagged_reports[hash['title']]
hash['flagged_by'] = flags.split(', ') if flags
+
+ # mark president reports
+ hash['to'] = 'president' if preports.include? section
end
unless @quick
# add roster and prior report link
whimsy = 'https://whimsy.apache.org'