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: find more resolutions and podlings
Date Mon, 01 Apr 2019 11:41:51 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 b4533eb  find more resolutions and podlings
b4533eb is described below

commit b4533eb9ae9555953bded4f470a7899304577c7a
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Mon Apr 1 07:41:25 2019 -0400

    find more resolutions and podlings
---
 lib/whimsy/asf/podling.rb   | 14 ++++++++++++--
 www/incubator/graduated.cgi | 11 +++++++----
 2 files changed, 19 insertions(+), 6 deletions(-)

diff --git a/lib/whimsy/asf/podling.rb b/lib/whimsy/asf/podling.rb
index 8f6d353..801ff28 100644
--- a/lib/whimsy/asf/podling.rb
+++ b/lib/whimsy/asf/podling.rb
@@ -66,8 +66,10 @@ module ASF
       @reporting = node.at('reporting') if node.at('reporting')
       @monthly = @reporting.text.split(/,\s*/) if @reporting and @reporting.text
 
+      @resolutionLink = node.at('resolution')['link'] if node.at('resolution')
+
       # Note: the following optional elements are not currently processed:
-      # - resolution
+      # - resolution (except for resolution/@link)
       # - retiring/graduating
       # The following podling attributes are not processed:
       # - longname
@@ -90,6 +92,11 @@ module ASF
       @name || @resource
     end
 
+    # TLP name (name differ from podling name)
+    def tlp_name
+      @resolutionLink || name
+    end
+
     # date this podling was accepted for incubation
     def startdate
       return unless @startdate
@@ -202,7 +209,10 @@ module ASF
     def self.find(name)
       name = name.downcase
       list.find do |podling| 
-        podling.name == name || podling.display_name.downcase == name
+        podling.name == name or podling.display_name.downcase == name or
+          podling.resource == name or
+          podling.tlp_name.downcase == name or
+          podling.resourceAliases.any? {|aname| aname.downcase == name}
       end
     end
 
diff --git a/www/incubator/graduated.cgi b/www/incubator/graduated.cgi
index 226a5d2..a0c2220 100755
--- a/www/incubator/graduated.cgi
+++ b/www/incubator/graduated.cgi
@@ -68,7 +68,7 @@ _html do
               _th 'Committee'
               _th 'Established'
               _th 'Podling status'
-              _th 'Graduated?'
+              _th 'Resolution mentions incubator?'
               _th 'Active?'
             end
           end
@@ -85,13 +85,16 @@ _html do
 
               establish = page.split('<h2').map { |report|
                 title = report[/<h3.*?<\/h3>/]
-                next unless title and title.downcase.include? 'establish'
+                next unless title and 
+                  %w(establish create creation).any? {|word|
+                    title.downcase.include? word
+                  }
                 graduated ||= report.downcase.include? 'incubator'
                 report[/id="(.*?)"/, 1]
               }.compact.first
 
-              incubated += 1 if graduated
               podling = ASF::Podling.find(name.downcase)
+              incubated += 1 if graduated or podling
 
               _tr_ do
                 _td do
@@ -103,7 +106,7 @@ _html do
                 _td do
                   if podling
                     _a podling.status, href:
-                      "https://incubator.apache.org/projects/#{name.downcase}.html"
+                      "https://incubator.apache.org/projects/#{podling.resource}.html"
                   end
                 end
                 _td graduated


Mime
View raw message