INNER CODE UNIT · Python
added
lissy93/portainer-templates · lib/changelog.py:113
added = sorted(current.keys() - previous.keys())
removed = sorted(previous.keys() - current.keys())
for pair in match_renames(previous, current, added, removed):
chain[pair['from']] = pair['to']
previous = current
return chain
def final_title(chain, title):
"""The name a title ends up under once its renames are followed, loops aside"""
seen = {title}
while title in chain and chain[title] not in seen:
title = chain[title]
seen.add(title)
return title
def print_diff(old_tag, new_tag):
"""Print one tag-to-tag diff as JSON, for the release notes in release.yml.
An empty old_tag, or one with no templates.json, counts as a first release."""