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 3000ba5 remove terminated pmcs from next month
3000ba5 is described below
commit 3000ba56867f534b3c7d6753af382150b8529fb4
Author: Sam Ruby <[email protected]>
AuthorDate: Sun Mar 25 12:54:56 2018 -0400
remove terminated pmcs from next month
---
lib/whimsy/asf/committee.rb | 13 +++++++++----
www/board/agenda/views/actions/todos.json.rb | 3 +--
2 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/lib/whimsy/asf/committee.rb b/lib/whimsy/asf/committee.rb
index ccfb39b..93126a6 100644
--- a/lib/whimsy/asf/committee.rb
+++ b/lib/whimsy/asf/committee.rb
@@ -119,7 +119,7 @@ module ASF
# update next month section. Remove entries that have reported or
# or expired; add (or update) entries that are missing; add entries
# for new committees.
- def self.update_next_month(contents, date, missing, rejected, establish)
+ def self.update_next_month(contents, date, missing, rejected, todos)
# extract next month section; and then extract the lines containing
# '#' signs from within that section
next_month = contents[/Next month.*?\n\n/m].chomp
@@ -163,10 +163,15 @@ module ASF
block += " #{pmc.ljust(22)} # missing in #{month}\n"
end
- # add new 'established' entries
+ # add new 'established' entries and remove 'terminated' entries
month = (date+91).strftime('%B')
- (establish-existing).each do |pmc|
- block += " #{pmc.ljust(22)} # new, monthly through #{month}\n"
+ todos.each do |resolution|
+ pmc = resolution['display_name']
+ if resolution['action'] == 'terminate'
+ block.sub! /^ #{pmc.ljust(22)} # .*\n/, ''
+ elsif resolution['action'] == 'establish' and not existing.include? pmc
+ block += " #{pmc.ljust(22)} # new, monthly through #{month}\n"
+ end
end
# replace/append block
diff --git a/www/board/agenda/views/actions/todos.json.rb
b/www/board/agenda/views/actions/todos.json.rb
index 56e1f9f..7510a29 100644
--- a/www/board/agenda/views/actions/todos.json.rb
+++ b/www/board/agenda/views/actions/todos.json.rb
@@ -76,8 +76,7 @@ if (@change || @establish || @terminate) and env.password
map {|item| item['title']}
rejected = minutes[:rejected] || []
contents = ASF::Committee.update_next_month(contents,
- Date.parse(date.gsub('_', '-')), missing, rejected,
- Array(@establish).map {|resolution| resolution['display_name']})
+ Date.parse(date.gsub('_', '-')), missing, rejected, todos)
end
# update chairs from establish, change, and terminate resolutions
--
To stop receiving notification emails like this one, please contact
[email protected].