Author: sebb
Date: Fri Apr 27 14:26:26 2018
New Revision: 1830359

URL: http://svn.apache.org/viewvc?rev=1830359&view=rev
Log:
Support tracker URLs

Modified:
    attic/site-jekyll/src/_data/project.txt
    attic/site-jekyll/src/_plugins/generate_projects.rb

Modified: attic/site-jekyll/src/_data/project.txt
URL: 
http://svn.apache.org/viewvc/attic/site-jekyll/src/_data/project.txt?rev=1830359&r1=1830358&r2=1830359&view=diff
==============================================================================
--- attic/site-jekyll/src/_data/project.txt (original)
+++ attic/site-jekyll/src/_data/project.txt Fri Apr 27 14:26:26 2018
@@ -14,11 +14,14 @@ nokeys: suppress the KEYS entry in the d
    "retired":     "April 2018",
    "scm":         "svn|git-wip|URL",
    "nokeys":      true,
-   "tracker":     ["JIRA|Bugzilla|...", "object"],
+   "tracker":     ["JIRA|Bugzilla|...", "key" | "Full URL (must contain ://)"],
    "wiki":        "URL",
    "board":       "The Minutes file name stem | default: project",
-   "mailnames":   ["dev","etc"],
+   "mailnames":   ["dev", "etc"],
    "description": "Describe the project",
    "postlude":    ["Optional text for end of page","line2",..]
 },
 ------ cut here ------
+
+Note: the file is processed by src/_plugins/generate_projects.rb
+It handles defaults and converts values into URLs etc.
\ No newline at end of file

Modified: attic/site-jekyll/src/_plugins/generate_projects.rb
URL: 
http://svn.apache.org/viewvc/attic/site-jekyll/src/_plugins/generate_projects.rb?rev=1830359&r1=1830358&r2=1830359&view=diff
==============================================================================
--- attic/site-jekyll/src/_plugins/generate_projects.rb (original)
+++ attic/site-jekyll/src/_plugins/generate_projects.rb Fri Apr 27 14:26:26 2018
@@ -58,17 +58,21 @@ module Jekyll
         type = tracker[0]
         targ = tracker[1]
         prj['issueType'] = type
-        case type
-          when 'JIRA'
-            prj['issueURL'] = "https://issues.apache.org/jira/browse/#{targ}/";
-          when 'Bugzilla'
-            prj['issueURL'] = 
"https://bz.apache.org/bugzilla/buglist.cgi?product=#{targ}";
-          when 'Bugzilla (AOO)' # hopefully never needed
-            prj['issueURL'] = 
"https://bz.apache.org/aoo/buglist.cgi?product=#{targ}";
-          when 'Bugzilla (SpamAssassin)'  # hopefully never needed
-            prj['issueURL'] = 
"https://bz.apache.org/SpamAssassin/buglist.cgi?product=#{targ}";
-          else
-            raise "Unexpected tracker: #{type} #{targ}"
+        if targ.include? '://' # assume it's an URL (it cannot be a JIRA or 
Bugzilla key)
+          prj['issueURL'] = targ
+        else
+          case type
+            when 'JIRA'
+              prj['issueURL'] = 
"https://issues.apache.org/jira/browse/#{targ}/";
+            when 'Bugzilla'
+              prj['issueURL'] = 
"https://bz.apache.org/bugzilla/buglist.cgi?product=#{targ}";
+            when 'Bugzilla (AOO)' # hopefully never needed
+              prj['issueURL'] = 
"https://bz.apache.org/aoo/buglist.cgi?product=#{targ}";
+            when 'Bugzilla (SpamAssassin)'  # hopefully never needed
+              prj['issueURL'] = 
"https://bz.apache.org/SpamAssassin/buglist.cgi?product=#{targ}";
+            else
+              raise "Unexpected tracker: #{type} #{targ}"
+          end
         end
       end
 


Reply via email to