From 1f57e24b478f07b9f78fc628d8722061a17243ec Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Sun, 7 Jul 2024 13:10:33 -0300 Subject: [PATCH] Implemented the `get_commit_authors` function to retrieve the authors for each commit. --- scripts/blame.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/blame.py b/scripts/blame.py index ad441c8fb..06ab8a4ad 100755 --- a/scripts/blame.py +++ b/scripts/blame.py @@ -31,6 +31,10 @@ def run(cmd): def get_commit_authors(commits): commit_to_author = dict() + for commit in commits: + author = run(["git", "show", "-s", "--format=%an <%ae>", commit]).strip() + commit_to_author[commit] = author + return commit_to_author def main(): @@ -43,10 +47,7 @@ def main(): dump(commits) authors = get_commit_authors(commits) - - - #text = run(['git', 'blame', f'{args.tag}..HEAD', '--', 'aider/main.py']) - #text = text.splitlines() + dump(authors)