INNER CODE UNIT · Python

format_commit

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

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

def main():
    git_path = os.getcwd()
    print("Current directory:", git_path)

    repo = git.Repo(git_path)
    print("Current branch:", repo.active_branch)

    start_hash = get_last_tag_hash(repo)
    end_hash = 'HEAD'

    commit_data = get_commit_data(repo, start_hash, end_hash)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…