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/21 18:11:55 UTC
[whimsy] branch master updated: have the shepherd be sticky when
there is an open AI
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 c16e18b have the shepherd be sticky when there is an open AI
c16e18b is described below
commit c16e18bd71804f50cca585a8583af23f57898180
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Wed Apr 21 14:08:05 2021 -0400
have the shepherd be sticky when there is an open AI
See https://lists.apache.org/thread.html/r632d3465d876e86b59e35cbc9cfa5b00bd9b4e1e7952020b25ecf8cc%40%3Cboard.apache.org%3E
---
lib/whimsy/asf/board.rb | 11 ++++++++---
www/board/agenda/routes.rb | 7 ++++++-
2 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/lib/whimsy/asf/board.rb b/lib/whimsy/asf/board.rb
index 5d1f1be..1f0af39 100644
--- a/lib/whimsy/asf/board.rb
+++ b/lib/whimsy/asf/board.rb
@@ -107,10 +107,11 @@ module ASF
# source for shepherd information, yields a stream of director names
# in random order
class ShepherdStream < Enumerator
- def initialize
+ def initialize(actions)
+ @actions = (actions || []).reverse
@directors = ASF::Service['board'].members
- super do |generator|
+ super() do |generator|
list = []
loop do
list = @directors.shuffle if list.empty?
@@ -126,7 +127,11 @@ module ASF
chair = pmc.chair
raise "no chair found for #{pmc.name}" unless chair
- if @directors.include? chair
+ action = @actions.find {|action| action[:pmc] == pmc.display_name}
+
+ if action
+ "#{chair.public_name} / #{action[:owner]}"
+ elsif @directors.include? chair
chair.public_name
else
"#{chair.public_name} / #{self.next}"
diff --git a/www/board/agenda/routes.rb b/www/board/agenda/routes.rb
index 40bfcc5..8e26a80 100755
--- a/www/board/agenda/routes.rb
+++ b/www/board/agenda/routes.rb
@@ -539,10 +539,15 @@ get '/new' do
next_month = contents[/Next month.*?\n\n/m].chomp
@next_month = next_month[/(.*#.*\n)+/] || ''
+ # get potential actions
+ actions = JSON.parse(Wunderbar::JsonBuilder.new({}).instance_eval(
+ File.read("#{settings.views}/actions/potential-actions.json.rb"),
+ ).target!, symbolize_names: true)[:actions]
+
# Get directors, list of pmcs due to report, and shepherds
@directors = ASF::Board.directors
@pmcs = ASF::Board.reporting(@meeting)
- @owner = ASF::Board::ShepherdStream.new
+ @owner = ASF::Board::ShepherdStream.new(actions)
# Get list of unpublished and unapproved minutes
draft = YAML.load_file(Dir["#{AGENDA_WORK}/board_minutes*.yml"].max)