From 35cbcde281c361b2ef3e3e8caf077d4c307f8a4b Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Fri, 16 Oct 2015 13:49:39 +0200 Subject: [PATCH] Add 'support' tracker to changelog.py fixes #10385 --- changelog.py | 50 ++++++++++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 22 deletions(-) diff --git a/changelog.py b/changelog.py index e44b06808..dd5da0865 100755 --- a/changelog.py +++ b/changelog.py @@ -54,6 +54,21 @@ def format_logentry(log_entry, args = args, issue_url = ISSUE_URL): else: 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 "" + print "" + version_name = args.version @@ -95,7 +110,9 @@ if changes: offset = 0 -log_entries = [] +features = [] +bugfixes = [] +support = [] while True: # 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: 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): - not_empty = False + if issue["tracker"]["name"] == "Feature": + 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: - if (p == 0 and log_entry[0] == "Feature") or (p == 1 and log_entry[0] != "Feature"): - not_empty = True +print_category("Feature", features) +print_category("Bugfixes", bugfixes) +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 "" - - print "" sys.exit(0)