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 <pet.v.ne@gmail.com>
This commit is contained in:
Peter Neuroth 2023-11-03 11:32:56 +01:00 committed by Christian Decker
parent 0da26933ac
commit 3cbe35e7da

View File

@ -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):