INNER CODE UNIT · Python

final_title

lissy93/portainer-templates · lib/changelog.py:120

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."""
    new = templates_at(new_tag)
    if new is None:
        log.error(f'No templates.json at {new_tag}, nothing to diff')
        sys.exit(1)
    old = templates_at(old_tag) if old_tag else {}
    if old is None:
        log.warning(f'No templates.json at {old_tag}, treating as a first release')

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…