From 315bc11bb995489fdb7b6affcc3d9a862e38c00e Mon Sep 17 00:00:00 2001 From: Peter Neuroth Date: Fri, 3 Nov 2023 11:32:56 +0100 Subject: [PATCH] devtools: Deduplicate links from linkify The method linkify just added links for an entry to a list and produced duplicates if we got more than one changelog line in a PR. We now only produce a link once per PR. Signed-off-by: Peter Neuroth --- devtools/changelog.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/devtools/changelog.py b/devtools/changelog.py index 73a6512ec3da..9b3810ec06fe 100755 --- a/devtools/changelog.py +++ b/devtools/changelog.py @@ -81,14 +81,14 @@ def get_log_entries(commitrange): def linkify(entries): - links = [] + links = {} for e in entries: - links.append(Link( + links[e.pullreq] = (Link( ref='#{}'.format(e.pullreq), content=e.content, url="https://github.com/ElementsProject/lightning/pull/{}".format(e.pullreq) )) - return list(set(links)) + return list(set(links.values())) def group(entries):