INNER CODE UNIT · Python

get_commit_data

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

def get_commit_data(repo, start_hash, end_hash):
    commits = repo.iter_commits(rev=f"{start_hash}..{end_hash}")
    commit_data = []

    for commit in commits:
        commit_info = {
            "message": commit.message.split('\n', 1)[0],  # Get only first line of message
            "author": commit.author.name,
            "co_authors": [],
            "hash": commit.hexsha[:7]
        }

        commit_message = commit.message.strip()
        lines = commit_message.split('\n')

        for line in lines:
            if line.startswith("Co-authored-by:"):
                co_author = line.split(":")[1].strip().split(" ")[0]  # Take only first word (nickname)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…