From 462ef6dfa4fce8610eec8001aa7b1b7794037e71 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sun, 31 Dec 2023 01:06:22 +0800 Subject: gen-changelog: Handles holding tickets --- gen-changelog.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/gen-changelog.py b/gen-changelog.py index e7ee1d7e7..3bf6bc064 100755 --- a/gen-changelog.py +++ b/gen-changelog.py @@ -76,6 +76,8 @@ for i in tsv: security.add(pkg) ticket[pkg] = tic +hold_ticket = {'vim': '4500', 'iana-etc': '5006'} + print("Plain Text:") for (s, act) in [(upd, "Update to "), (add, "Add ")]: for i in s: @@ -83,6 +85,8 @@ for (s, act) in [(upd, "Update to "), (add, "Add ")]: out = act + pkgver if pkgver in ticket: out += ' (#' + ticket[pkgver] + ')' + elif i in hold_ticket: + out += ' (#' + hold_ticket[i] + ')' print("-", out) for i in rem: print("-", "Remove", i) @@ -99,10 +103,18 @@ for (s, act) in [(upd, "Update to "), (add, "Add ")]: if pkgver in security: out += " (security fix)" out += "." + + pkg_ticket = None if pkgver in ticket: out += " Fixes\n " - out += "#" - out += ticket[pkgver] + "." + pkg_ticket = ticket[pkgver] + elif i in hold_ticket: + out += " Addresses\n " + pkg_ticket = hold_ticket[i] + + if pkg_ticket: + out += "#" + out += pkg_ticket + "." out += "" print(out) print(' ') -- cgit v1.2.3-54-g00ecf