INNER CODE UNIT · Python

get_last_tag_hash

ixray-team/ixray-1.6-stcop · util/changelog_builder.py:28

def get_last_tag_hash(repo):
    tags = repo.tags

    # Sort tags by commit timestamp in reverse order
    sorted_tags = sorted(tags, key=lambda x: x.commit.committed_datetime, reverse=True)

    last_tag = sorted_tags[0]
    last_tag_commit = last_tag.commit
    last_tag_hash = last_tag_commit.hexsha

    print("Name of the last tag:", last_tag.name)
    print("Hash of the last tag:", last_tag_hash)

    return last_tag_hash

def format_commit(commit):
    formatted_co_authors = ", ".join([f"@{author}" for author in commit["co_authors"]])
    if formatted_co_authors:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…