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 2017/09/26 19:35:20 UTC
[whimsy] branch master updated (bd43869 -> 16dd23d)
This is an automated email from the ASF dual-hosted git repository.
rubys pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git.
from bd43869 update code to process PMC resolutions
new 6ff0d02 use canonical PMC names, and ensure canonical PMC names don't have spaces
new 63fac78 check new PMCs against guinea pig list
new 16dd23d make todos idempotent
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
lib/whimsy/asf/committee.rb | 15 +++++---
www/board/agenda/views/actions/todos.json.rb | 57 +++++++++++++++-------------
2 files changed, 41 insertions(+), 31 deletions(-)
--
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <co...@whimsical.apache.org>'].
[whimsy] 02/03: check new PMCs against guinea pig list
Posted by ru...@apache.org.
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
commit 63fac78b76c38e964323082dcb53c9c39a241773
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Tue Sep 26 15:34:08 2017 -0400
check new PMCs against guinea pig list
---
www/board/agenda/views/actions/todos.json.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/www/board/agenda/views/actions/todos.json.rb b/www/board/agenda/views/actions/todos.json.rb
index d0fa783..52a2b26 100644
--- a/www/board/agenda/views/actions/todos.json.rb
+++ b/www/board/agenda/views/actions/todos.json.rb
@@ -131,7 +131,7 @@ if @establish and env.password
# new style definitions
project = ASF::Project[pmc.downcase]
if not project
- unless ASF::Committee[pmc.downcase]
+ unless ASF::Committee[pmc.downcase] or guineapig
ASF::Committee.add(pmc.downcase, members)
end
--
To stop receiving notification emails like this one, please contact
"commits@whimsical.apache.org" <co...@whimsical.apache.org>.
[whimsy] 01/03: use canonical PMC names,
and ensure canonical PMC names don't have spaces
Posted by ru...@apache.org.
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
commit 6ff0d0239f0b0801b568824960ea964a66db369b
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Tue Sep 26 15:33:15 2017 -0400
use canonical PMC names, and ensure canonical PMC names don't have spaces
---
lib/whimsy/asf/committee.rb | 2 +-
www/board/agenda/views/actions/todos.json.rb | 13 ++++++++-----
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/lib/whimsy/asf/committee.rb b/lib/whimsy/asf/committee.rb
index 25a179b..1a06668 100644
--- a/lib/whimsy/asf/committee.rb
+++ b/lib/whimsy/asf/committee.rb
@@ -82,7 +82,7 @@ module ASF
'incubating' => 'incubator' # special for index.html
@@namemap = Proc.new do |name|
- cname = @@aliases[name.sub(/\s+\(.*?\)/, '').downcase]
+ cname = @@aliases[name.sub(/\s+\(.*?\)/, '').downcase].gsub(/\s+/, '')
cname
end
diff --git a/www/board/agenda/views/actions/todos.json.rb b/www/board/agenda/views/actions/todos.json.rb
index 29b6bb6..d0fa783 100644
--- a/www/board/agenda/views/actions/todos.json.rb
+++ b/www/board/agenda/views/actions/todos.json.rb
@@ -237,17 +237,20 @@ change = []
parsed_agenda.each do |item|
next unless item[:attach] =~ /^7\w$/
if item['title'] =~ /^Change (.*?) Chair$/ and item['people']
- next if Array(minutes[:todos][:changed]).include? $1
- change << {name: $1, resolution: item['title'], chair: item['chair']}
+ pmc = ASF::Committee.find($1).id
+ next if Array(minutes[:todos][:changed]).include? pmc
+ change << {name: pmc, resolution: item['title'], chair: item['chair']}
item['people'].keys.each do |person|
transitioning[ASF::Person.find(person)] = item['title']
end
elsif item['title'] =~ /^Establish\s*(.*?)\s*$/ and item['chair']
- next if Array(minutes[:todos][:established]).include? $1
- establish << {name: $1, resolution: item['title'], chair: item['chair']}
+ pmc = ASF::Committee.find(pmc).id
+ next if Array(minutes[:todos][:established]).include? pmc
+ establish << {name: pmc, resolution: item['title'], chair: item['chair']}
transitioning[ASF::Person.find(item['chair'])] = item['title']
elsif item['title'] =~ /^Terminate\s*(.*?)\s*$/
- next if Array(minutes[:todos][:terminated]).include? $1
+ pmc = ASF::Committee.find($1).id
+ next if Array(minutes[:todos][:terminated]).include? pmc
terminate[$1] = item['title']
end
end
--
To stop receiving notification emails like this one, please contact
"commits@whimsical.apache.org" <co...@whimsical.apache.org>.
[whimsy] 03/03: make todos idempotent
Posted by ru...@apache.org.
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
commit 16dd23d0a4a3deef018171df2ee587bab1075107
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Tue Sep 26 15:35:04 2017 -0400
make todos idempotent
---
lib/whimsy/asf/committee.rb | 13 ++++++---
www/board/agenda/views/actions/todos.json.rb | 42 +++++++++++++++-------------
2 files changed, 31 insertions(+), 24 deletions(-)
diff --git a/lib/whimsy/asf/committee.rb b/lib/whimsy/asf/committee.rb
index 1a06668..f575b28 100644
--- a/lib/whimsy/asf/committee.rb
+++ b/lib/whimsy/asf/committee.rb
@@ -119,23 +119,28 @@ module ASF
block.gsub!(/.* # new, monthly through #{month}\n/, '')
# update/remove existing 'missing' entries
+ existing = []
block.gsub! /(.*?)# missing in .*\n/ do |line|
if missing.include? $1.strip
- missing.delete $1.strip
- "#{line.chomp}, #{month}\n"
+ existing << $1.strip
+ if line.chomp.end_with? month
+ line
+ else
+ "#{line.chomp}, #{month}\n"
+ end
else
''
end
end
# add new 'missing' entries
- missing.each do |pmc|
+ (missing-existing).each do |pmc|
block += " #{pmc.ljust(22)} # missing in #{month}\n"
end
# add new 'established' entries
month = (date+91).strftime('%B')
- establish.each do |pmc|
+ (establish-existing).each do |pmc|
block += " #{pmc.ljust(22)} # new, monthly through #{month}\n"
end
diff --git a/www/board/agenda/views/actions/todos.json.rb b/www/board/agenda/views/actions/todos.json.rb
index 52a2b26..c3e9ccb 100644
--- a/www/board/agenda/views/actions/todos.json.rb
+++ b/www/board/agenda/views/actions/todos.json.rb
@@ -167,38 +167,40 @@ end
if (@change || @establish) and env.password
chairs = ASF::Service.find('pmc-chairs')
+ # select all new chairs
todos = Array(@change) + Array(@establish)
people = todos.map {|todo| ASF::Person.find(todo['chair'])}.uniq
+ people -= chairs.members
- # add new chairs to pmc-chairs
- unless (people-chairs.members).empty?
+ unless people.empty?
+ # add new chairs to pmc-chairs
ASF::LDAP.bind(env.user, env.password) do
chairs.add people-chairs.members
end
- end
- # send out congratulations email
- ASF::Mail.configure
- sender = ASF::Person.new(env.user)
- mail = Mail.new do
- from "#{sender.public_name.inspect} <#{...@apache.org>".untaint
+ # send out congratulations email
+ ASF::Mail.configure
+ sender = ASF::Person.new(env.user)
+ mail = Mail.new do
+ from "#{sender.public_name.inspect} <#{...@apache.org>".untaint
- to people.map {|person|
- "#{person.public_name.inspect} <#{...@apache.org>".untaint
- }.to_a
+ to people.map {|person|
+ "#{person.public_name.inspect} <#{...@apache.org>".untaint
+ }.to_a
- cc 'Apache Board <bo...@apache.org>'
+ cc 'Apache Board <bo...@apache.org>'
- subject "Congratulations on your new role at Apache"
+ subject "Congratulations on your new role at Apache"
- body "Dear new PMC chairs,\n\nCongratulations on your new role at " +
- "Apache. I've changed your LDAP privileges to reflect your new " +
- "status.\n\nPlease read this and update the foundation records:\n" +
- "https://svn.apache.org/repos/private/foundation/officers/advice-for-new-pmc-chairs.txt" +
- "\n\nWarm regards,\n\n#{sender.public_name}"
- end
+ body "Dear new PMC chairs,\n\nCongratulations on your new role at " +
+ "Apache. I've changed your LDAP privileges to reflect your new " +
+ "status.\n\nPlease read this and update the foundation records:\n" +
+ "https://svn.apache.org/repos/private/foundation/officers/advice-for-new-pmc-chairs.txt" +
+ "\n\nWarm regards,\n\n#{sender.public_name}"
+ end
- mail.deliver!
+ mail.deliver!
+ end
end
########################################################################
--
To stop receiving notification emails like this one, please contact
"commits@whimsical.apache.org" <co...@whimsical.apache.org>.