yetus-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject yetus git commit: YETUS-31. releasedocmaker should use the Important flag in jira
Date Wed, 14 Oct 2015 16:14:26 GMT
Repository: yetus
Updated Branches:
  refs/heads/master 982c52777 -> d4fbe6d07


YETUS-31. releasedocmaker should use the Important flag in jira

Signed-off-by: Allen Wittenauer <aw@apache.org>


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

Branch: refs/heads/master
Commit: d4fbe6d07a05f98ce7b5240439fc97e291b762cd
Parents: 982c527
Author: Kengo Seki <sekikn@gmail.com>
Authored: Tue Oct 13 09:45:04 2015 +0900
Committer: Allen Wittenauer <aw@apache.org>
Committed: Wed Oct 14 09:14:16 2015 -0700

----------------------------------------------------------------------
 dev-support/releasedocmaker.py | 31 ++++++++++++++++++++++++++++++-
 1 file changed, 30 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/yetus/blob/d4fbe6d0/dev-support/releasedocmaker.py
----------------------------------------------------------------------
diff --git a/dev-support/releasedocmaker.py b/dev-support/releasedocmaker.py
index 0c16d8a..586d4c2 100755
--- a/dev-support/releasedocmaker.py
+++ b/dev-support/releasedocmaker.py
@@ -193,6 +193,7 @@ class Jira(object):
         self.notes = None
         self.incompat = None
         self.reviewed = None
+        self.important = None
 
     def get_id(self):
         return mstr(self.key)
@@ -280,6 +281,17 @@ class Jira(object):
                             self.reviewed = True
         return self.incompat
 
+    def get_important(self):
+        if self.important is None:
+            field = self.parent.field_id_map['Flags']
+            self.important = False
+            if self.fields.has_key(field):
+                if self.fields[field]:
+                    for flag in self.fields[field]:
+                        if flag['value'] == "Important":
+                            self.important = True
+        return self.important
+
     def check_missing_component(self):
         if len(self.fields['components']) > 0:
             return False
@@ -479,7 +491,7 @@ def main():
 
         relhead = '# %(title)s %(key)s %(ver)s Release Notes\n\n' \
                   'These release notes cover new developer and user-facing ' \
-                  'incompatibilities, features, and major improvements.\n\n'
+                  'incompatibilities, important issues, features, and major improvements.\n\n'
         chhead = '# %(title)s Changelog\n\n' \
                  '## Release %(ver)s - %(date)s\n'\
                  '\n'
@@ -490,6 +502,7 @@ def main():
         warning_count = 0
         lint_message = ""
         incompatlist = []
+        importantlist = []
         buglist = []
         improvementlist = []
         newfeaturelist = []
@@ -501,6 +514,8 @@ def main():
         for jira in sorted(jlist):
             if jira.get_incompatible_change():
                 incompatlist.append(jira)
+            elif jira.get_important():
+                importantlist.append(jira)
             elif jira.get_type() == "Bug":
                 buglist.append(jira)
             elif jira.get_type() == "Improvement":
@@ -529,6 +544,15 @@ def main():
                                 (notableclean(jira.get_id()))
                 reloutputs.write_key_raw(jira.get_project(), line)
 
+            if jira.get_important() and len(jira.get_release_note()) == 0:
+                warning_count += 1
+                reloutputs.write_key_raw(jira.get_project(), "\n---\n\n")
+                reloutputs.write_key_raw(jira.get_project(), line)
+                line = '\n**WARNING: No release note provided for this important issue.**\n\n'
+                lint_message += "\nWARNING: important issue %s lacks release notes." % \
+                                (notableclean(jira.get_id()))
+                reloutputs.write_key_raw(jira.get_project(), line)
+
             if jira.check_version_string():
                 warning_count += 1
                 lint_message += "\nWARNING: Version string problem for %s " % jira.get_id()
@@ -566,6 +590,11 @@ def main():
         choutputs.write_all("|:---- |:---- | :--- |:---- |:---- |:---- |\n")
         choutputs.write_list(incompatlist)
 
+        choutputs.write_all("\n\n### IMPORTANT ISSUES:\n\n")
+        choutputs.write_all("| JIRA | Summary | Priority | Component | Reporter | Contributor
|\n")
+        choutputs.write_all("|:---- |:---- | :--- |:---- |:---- |:---- |\n")
+        choutputs.write_list(importantlist)
+
         choutputs.write_all("\n\n### NEW FEATURES:\n\n")
         choutputs.write_all("| JIRA | Summary | Priority | Component | Reporter | Contributor
|\n")
         choutputs.write_all("|:---- |:---- | :--- |:---- |:---- |:---- |\n")


Mime
View raw message