mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-26 23:24:09 +02:00
parent
ed00ab04c7
commit
35cbcde281
50
changelog.py
50
changelog.py
@ -54,6 +54,21 @@ def format_logentry(log_entry, args = args, issue_url = ISSUE_URL):
|
|||||||
else:
|
else:
|
||||||
return "* %s %d: %s" % log_entry
|
return "* %s %d: %s" % log_entry
|
||||||
|
|
||||||
|
def print_category(category, entries):
|
||||||
|
if len(entries) > 0:
|
||||||
|
print ""
|
||||||
|
print format_header(category, 4)
|
||||||
|
print ""
|
||||||
|
if args.html:
|
||||||
|
print "<ul>"
|
||||||
|
|
||||||
|
for entry in sorted(entries):
|
||||||
|
print format_logentry(entry)
|
||||||
|
|
||||||
|
if args.html:
|
||||||
|
print "</ul>"
|
||||||
|
print ""
|
||||||
|
|
||||||
|
|
||||||
version_name = args.version
|
version_name = args.version
|
||||||
|
|
||||||
@ -95,7 +110,9 @@ if changes:
|
|||||||
|
|
||||||
offset = 0
|
offset = 0
|
||||||
|
|
||||||
log_entries = []
|
features = []
|
||||||
|
bugfixes = []
|
||||||
|
support = []
|
||||||
|
|
||||||
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
|
||||||
@ -120,29 +137,18 @@ while True:
|
|||||||
if ignore_issue:
|
if ignore_issue:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
log_entries.append((issue["tracker"]["name"], issue["id"], issue["subject"].strip()))
|
entry = (issue["tracker"]["name"], issue["id"], issue["subject"].strip())
|
||||||
|
|
||||||
for p in range(2):
|
if issue["tracker"]["name"] == "Feature":
|
||||||
not_empty = False
|
features.append(entry)
|
||||||
|
elif issue["tracker"]["name"] == "Bug":
|
||||||
|
bugfixes.append(entry)
|
||||||
|
elif issue["tracker"]["name"] == "Support":
|
||||||
|
support.append(entry)
|
||||||
|
|
||||||
for log_entry in log_entries:
|
print_category("Feature", features)
|
||||||
if (p == 0 and log_entry[0] == "Feature") or (p == 1 and log_entry[0] != "Feature"):
|
print_category("Bugfixes", bugfixes)
|
||||||
not_empty = True
|
print_category("Support", support)
|
||||||
|
|
||||||
if not_empty:
|
|
||||||
print format_header("Features", 4) if p == 0 else format_header("Bugfixes", 4)
|
|
||||||
print ""
|
|
||||||
if args.html:
|
|
||||||
print "<ul>"
|
|
||||||
|
|
||||||
for log_entry in sorted(log_entries):
|
|
||||||
if (p == 0 and log_entry[0] == "Feature") or (p == 1 and log_entry[0] != "Feature"):
|
|
||||||
print format_logentry(log_entry)
|
|
||||||
|
|
||||||
if not_empty:
|
|
||||||
if args.html:
|
|
||||||
print "</ul>"
|
|
||||||
|
|
||||||
print ""
|
|
||||||
|
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user