Skip to content

Commit

Permalink
devtools: Deduplicate links from linkify
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
nepet committed Jan 15, 2024
1 parent b135ba2 commit 315bc11
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions devtools/changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 315bc11

Please sign in to comment.