whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject [whimsy] branch master updated: add an incubator/podling crosscheck
Date Sat, 10 Jun 2017 23:09:16 GMT
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 1ab4623  add an incubator/podling crosscheck
1ab4623 is described below

commit 1ab4623c170bb6fbddf3e0acbc4bf54a0ca1b5f6
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Sat Jun 10 19:08:37 2017 -0400

    add an incubator/podling crosscheck
---
 www/incubator/podling-crosscheck.cgi | 158 +++++++++++++++++++++++++++++++++++
 1 file changed, 158 insertions(+)

diff --git a/www/incubator/podling-crosscheck.cgi b/www/incubator/podling-crosscheck.cgi
new file mode 100755
index 0000000..cd90a97
--- /dev/null
+++ b/www/incubator/podling-crosscheck.cgi
@@ -0,0 +1,158 @@
+#!/usr/bin/env ruby
+PAGETITLE = "Incubator/Podling crosscheck" # Wvisible:tools
+
+$LOAD_PATH.unshift File.realpath(File.expand_path('../../../lib', __FILE__))
+require 'json'
+require 'whimsy/asf'
+require 'wunderbar'
+require 'wunderbar/bootstrap'
+
+def get_data(defaults: {})
+  return {
+    "Sample data processing here" => "row 1",
+    "This could come from a file" => "row B"
+  }
+end
+
+_html do
+  _body? do
+    _whimsy_body(
+      title: PAGETITLE,
+      related: {
+        "https://whimsy.apache.org/committers/tools" => "Whimsy Tool Listing",
+        "https://incubator.apache.org/images/incubator_feather_egg_logo_sm.png" => "Incubator
Logo, to show that graphics can appear",
+        "https://community.apache.org/" => "Get Community Help",
+        "https://github.com/apache/whimsy/blob/master/www#{ENV['SCRIPT_NAME']}" => "See
This Source Code"
+      },
+      helpblock: -> {
+        _p %{
+          This script cross-checks Incubator PMC lists in LDAP, mentor lists
+          in podlings.xml, and Podling lists in LDAP.
+        }
+      }
+    ) do
+
+
+      ASF.init_ldap
+
+      ipmc = ASF::Project.find('incubator').owners
+      incubator = ASF::Project.find('incubator').members
+
+      podlings = ASF::Podling.current.map {|podling| podling.id}
+      podling_committers = ASF::Project.preload.
+	select {|name, project| podlings.include? name}.
+	map {|name, project| project.members}.flatten.uniq
+
+      #
+      ### Podling mentors vs IPMC
+      #
+      _whimsy_panel_table(
+        title: "Podling Mentors that are not IPMC members",
+      ) do
+        _table.table.table_hover.table_striped do
+          _thead_ do
+            _tr do
+              _th 'Podling'
+              _th 'Mentor'
+            end
+            _tbody do
+              ASF::Podling.list.each do |podling|
+                next unless podling.status == 'current'
+                mentors = podling.mentors.map {|id| ASF::Person.find(id)}
+                orphans = podling.members - incubator
+                unless orphans.empty?
+                  orphans.each do |person|
+                    if 
+                      podling.mentors.include? person.id
+                    then
+                      _tr_ do
+                        _td do
+                          _a podling.display_name, 
+                            href: "../../roster/ppmc/#{podling.id}"
+                        end
+                        _td do
+                          _a person.public_name,
+                            href: "../../roster/committer/#{person.id}"
+                        end
+                      end
+                    end
+                  end
+                end
+              end
+            end
+          end
+        end
+      end
+
+      #
+      ### PPMC committers vs incubator committers 
+      #
+      _whimsy_panel_table(
+        title: "Podling Committers that are not Incubator committers",
+      ) do
+        _table.table.table_hover.table_striped do
+          _thead_ do
+            _tr do
+              _th 'Podling'
+              _th 'Committer'
+            end
+            _tbody do
+              ASF::Podling.list.each do |podling|
+                next unless podling.status == 'current'
+                mentors = podling.mentors.map {|id| ASF::Person.find(id)}
+                orphans = podling.members - incubator
+                unless orphans.empty?
+                  orphans.each do |person|
+                    if 
+                      not podling.mentors.include? person.id
+                    then
+                      _tr_ do
+                        _td do
+                          _a podling.display_name, 
+                            href: "../../roster/ppmc/#{podling.id}"
+                        end
+                        _td do
+                          _a person.public_name,
+                            href: "../../roster/committer/#{person.id}"
+                        end
+                      end
+                    end
+                  end
+                end
+              end
+            end
+          end
+        end
+      end
+
+      #
+      ### Incubator committers vs Podling committers
+      #
+      _whimsy_panel_table(
+        title: "Incubator committers that are not on the IPMC and are not 
+                listed as a committer of any podling"
+      ) do
+        _table.table.table_hover.table_striped do
+          _thead_ do
+            _tr do
+              _th 'Committer'
+            end
+            _tbody do
+              incubator.sort_by {|person| person.public_name}.each do |person|
+                next if ipmc.include? person
+                next if podling_committers.include? person
+                _tr_ do
+                  _td do
+                    _a person.public_name,
+                      href: "../../roster/committer/#{person.id}"
+                  end
+                end
+              end
+            end
+          end
+        end
+      end
+
+    end
+  end
+end

-- 
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <commits@whimsical.apache.org>'].

Mime
View raw message