mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-28 16:14:09 +02:00
parent
ca7f195165
commit
aca4af801b
33
changelog.py
33
changelog.py
@ -16,7 +16,7 @@
|
|||||||
# along with this program; if not, write to the Free Software Foundation
|
# along with this program; if not, write to the Free Software Foundation
|
||||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
|
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
import urllib2, json, sys, string
|
import urllib2, json, sys, string, collections
|
||||||
from argparse import ArgumentParser
|
from argparse import ArgumentParser
|
||||||
|
|
||||||
DESCRIPTION="update release changes"
|
DESCRIPTION="update release changes"
|
||||||
@ -60,8 +60,11 @@ def print_category(category, entries):
|
|||||||
if args.html:
|
if args.html:
|
||||||
print "<ul>"
|
print "<ul>"
|
||||||
|
|
||||||
for entry in sorted(entries):
|
tmp_entries = collections.OrderedDict(sorted(entries.items()))
|
||||||
print format_logentry(entry)
|
|
||||||
|
for cat, entry_list in tmp_entries.iteritems():
|
||||||
|
for entry in entry_list:
|
||||||
|
print format_logentry(entry)
|
||||||
|
|
||||||
if args.html:
|
if args.html:
|
||||||
print "</ul>"
|
print "</ul>"
|
||||||
@ -108,9 +111,10 @@ if changes:
|
|||||||
|
|
||||||
offset = 0
|
offset = 0
|
||||||
|
|
||||||
features = []
|
features = {}
|
||||||
bugfixes = []
|
bugfixes = {}
|
||||||
support = []
|
support = {}
|
||||||
|
category = ""
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
# We could filter using &cf_13=1, however this doesn't currently work because the custom field isn't set
|
# We could filter using &cf_13=1, however this doesn't currently work because the custom field isn't set
|
||||||
@ -136,7 +140,7 @@ while True:
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
if "category" in issue:
|
if "category" in issue:
|
||||||
category = issue["category"]["name"]
|
category = str(issue["category"]["name"])
|
||||||
else:
|
else:
|
||||||
category = "no category"
|
category = "no category"
|
||||||
|
|
||||||
@ -144,11 +148,20 @@ while True:
|
|||||||
entry = (issue["tracker"]["name"], issue["id"], category, issue["subject"].strip())
|
entry = (issue["tracker"]["name"], issue["id"], category, issue["subject"].strip())
|
||||||
|
|
||||||
if issue["tracker"]["name"] == "Feature":
|
if issue["tracker"]["name"] == "Feature":
|
||||||
features.append(entry)
|
try:
|
||||||
|
features[category].append(entry)
|
||||||
|
except KeyError:
|
||||||
|
features[category] = [ entry ]
|
||||||
elif issue["tracker"]["name"] == "Bug":
|
elif issue["tracker"]["name"] == "Bug":
|
||||||
bugfixes.append(entry)
|
try:
|
||||||
|
bugfixes[category].append(entry)
|
||||||
|
except KeyError:
|
||||||
|
bugfixes[category] = [ entry ]
|
||||||
elif issue["tracker"]["name"] == "Support":
|
elif issue["tracker"]["name"] == "Support":
|
||||||
support.append(entry)
|
try:
|
||||||
|
support[category].append(entry)
|
||||||
|
except KeyError:
|
||||||
|
support[category] = [ entry ]
|
||||||
|
|
||||||
print_category("Feature", features)
|
print_category("Feature", features)
|
||||||
print_category("Bugfixes", bugfixes)
|
print_category("Bugfixes", bugfixes)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user