yetus-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aajis...@apache.org
Subject yetus git commit: YETUS-690. releasedocmaker has a hard-coded reference to ASF JIRA
Date Wed, 26 Sep 2018 01:26:35 GMT
Repository: yetus
Updated Branches:
  refs/heads/master 293c23e30 -> f2610ec5a


YETUS-690. releasedocmaker has a hard-coded reference to ASF JIRA

Signed-off-by: Akira Ajisaka <aajisaka@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/yetus/repo
Commit: http://git-wip-us.apache.org/repos/asf/yetus/commit/f2610ec5
Tree: http://git-wip-us.apache.org/repos/asf/yetus/tree/f2610ec5
Diff: http://git-wip-us.apache.org/repos/asf/yetus/diff/f2610ec5

Branch: refs/heads/master
Commit: f2610ec5a8a17ee2c8d177155d2756619f2a9b6c
Parents: 293c23e
Author: Allen Wittenauer <aw@apache.org>
Authored: Fri Sep 7 10:38:52 2018 -0700
Committer: Akira Ajisaka <aajisaka@apache.org>
Committed: Wed Sep 26 10:25:27 2018 +0900

----------------------------------------------------------------------
 release-doc-maker/releasedocmaker.py | 18 +++++++++---------
 release-doc-maker/utils.py           |  8 ++++----
 2 files changed, 13 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/yetus/blob/f2610ec5/release-doc-maker/releasedocmaker.py
----------------------------------------------------------------------
diff --git a/release-doc-maker/releasedocmaker.py b/release-doc-maker/releasedocmaker.py
index 3700d71..90658af 100755
--- a/release-doc-maker/releasedocmaker.py
+++ b/release-doc-maker/releasedocmaker.py
@@ -888,50 +888,50 @@ def main():
             choutputs.write_all("### INCOMPATIBLE CHANGES:\n\n")
             choutputs.write_all(CHANGEHDR1)
             choutputs.write_all(CHANGEHDR2)
-            choutputs.write_list(incompatlist, options.skip_credits)
+            choutputs.write_list(incompatlist, options.skip_credits, JIRA_BASE_URL)
 
         if importantlist:
             choutputs.write_all("\n\n### IMPORTANT ISSUES:\n\n")
             choutputs.write_all(CHANGEHDR1)
             choutputs.write_all(CHANGEHDR2)
-            choutputs.write_list(importantlist, options.skip_credits)
+            choutputs.write_list(importantlist, options.skip_credits, JIRA_BASE_URL)
 
         if newfeaturelist:
             choutputs.write_all("\n\n### NEW FEATURES:\n\n")
             choutputs.write_all(CHANGEHDR1)
             choutputs.write_all(CHANGEHDR2)
-            choutputs.write_list(newfeaturelist, options.skip_credits)
+            choutputs.write_list(newfeaturelist, options.skip_credits, JIRA_BASE_URL)
 
         if improvementlist:
             choutputs.write_all("\n\n### IMPROVEMENTS:\n\n")
             choutputs.write_all(CHANGEHDR1)
             choutputs.write_all(CHANGEHDR2)
-            choutputs.write_list(improvementlist, options.skip_credits)
+            choutputs.write_list(improvementlist, options.skip_credits, JIRA_BASE_URL)
 
         if buglist:
             choutputs.write_all("\n\n### BUG FIXES:\n\n")
             choutputs.write_all(CHANGEHDR1)
             choutputs.write_all(CHANGEHDR2)
-            choutputs.write_list(buglist, options.skip_credits)
+            choutputs.write_list(buglist, options.skip_credits, JIRA_BASE_URL)
 
         if testlist:
             choutputs.write_all("\n\n### TESTS:\n\n")
             choutputs.write_all(CHANGEHDR1)
             choutputs.write_all(CHANGEHDR2)
-            choutputs.write_list(testlist, options.skip_credits)
+            choutputs.write_list(testlist, options.skip_credits, JIRA_BASE_URL)
 
         if subtasklist:
             choutputs.write_all("\n\n### SUB-TASKS:\n\n")
             choutputs.write_all(CHANGEHDR1)
             choutputs.write_all(CHANGEHDR2)
-            choutputs.write_list(subtasklist, options.skip_credits)
+            choutputs.write_list(subtasklist, options.skip_credits, JIRA_BASE_URL)
 
         if tasklist or otherlist:
             choutputs.write_all("\n\n### OTHER:\n\n")
             choutputs.write_all(CHANGEHDR1)
             choutputs.write_all(CHANGEHDR2)
-            choutputs.write_list(otherlist, options.skip_credits)
-            choutputs.write_list(tasklist, options.skip_credits)
+            choutputs.write_list(otherlist, options.skip_credits, JIRA_BASE_URL)
+            choutputs.write_list(tasklist, options.skip_credits, JIRA_BASE_URL)
 
         choutputs.write_all("\n\n")
         choutputs.close()

http://git-wip-us.apache.org/repos/asf/yetus/blob/f2610ec5/release-doc-maker/utils.py
----------------------------------------------------------------------
diff --git a/release-doc-maker/utils.py b/release-doc-maker/utils.py
index 1e025da..5479980 100644
--- a/release-doc-maker/utils.py
+++ b/release-doc-maker/utils.py
@@ -26,7 +26,6 @@ import httplib
 sys.dont_write_bytecode = True
 
 NAME_PATTERN = re.compile(r' \([0-9]+\)')
-BASE_URL = "https://issues.apache.org/jira"
 
 def clean(input_string):
     return sanitize_markdown(re.sub(NAME_PATTERN, "", input_string))
@@ -183,7 +182,8 @@ class Outputs(object):
         for value in self.others.values():
             value.close()
 
-    def write_list(self, mylist, skip_credits):
+    def write_list(self, mylist, skip_credits, base_url):
+        """ Take a Jira object and write out the relevants parts in a multimarkdown table
line"""
         for jira in sorted(mylist):
             if skip_credits:
                 line = '| [{id}]({base_url}/browse/{id}) | {summary} |  ' \
@@ -192,12 +192,12 @@ class Outputs(object):
                 line = '| [{id}]({base_url}/browse/{id}) | {summary} |  ' \
                        '{priority} | {component} | {reporter} | {assignee} |\n'
             args = {'id': encode_utf8(jira.get_id()),
-                    'base_url': BASE_URL,
+                    'base_url': base_url,
                     'summary': sanitize_text(jira.get_summary()),
                     'priority': sanitize_text(jira.get_priority()),
                     'component': format_components(jira.get_components()),
                     'reporter': sanitize_text(jira.get_reporter()),
                     'assignee': sanitize_text(jira.get_assignee())
-                    }
+                   }
             line = line.format(**args)
             self.write_key_raw(jira.get_project(), line)


Mime
View raw message