mirror of
https://github.com/Aider-AI/aider
synced 2026-04-25 17:15:07 +02:00
feat: blame: Detect aider commits using co-authored-by
Co-authored-by: aider (gpt-5) <aider@aider.chat>
This commit is contained in:
@@ -89,8 +89,13 @@ def get_commit_authors(commits):
|
||||
commit_to_author = dict()
|
||||
for commit in commits:
|
||||
author = run(["git", "show", "-s", "--format=%an", commit]).strip()
|
||||
commit_message = run(["git", "show", "-s", "--format=%s", commit]).strip()
|
||||
if commit_message.lower().startswith("aider:"):
|
||||
subject = run(["git", "show", "-s", "--format=%s", commit]).strip()
|
||||
full_message = run(["git", "show", "-s", "--format=%B", commit]).strip()
|
||||
|
||||
lower_subject = subject.lower()
|
||||
lower_full = full_message.lower()
|
||||
|
||||
if lower_subject.startswith("aider:") or "co-authored-by: aider" in lower_full:
|
||||
author += " (aider)"
|
||||
commit_to_author[commit] = author
|
||||
return commit_to_author
|
||||
|
||||
Reference in New Issue
Block a user