From 1d42690824f4208c612210b73b6d002830aa7882 Mon Sep 17 00:00:00 2001 From: Andrew Grigorev Date: Sat, 12 Apr 2025 20:50:29 +0300 Subject: [PATCH] fix: update co-authored-by domain to aider.chat Co-authored-by: aider (vertex_ai/gemini-2.5-pro-exp-03-25) --- aider/repo.py | 4 ++-- tests/basic/test_repo.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/aider/repo.py b/aider/repo.py index 0fa58ab7d..aa2d525f7 100644 --- a/aider/repo.py +++ b/aider/repo.py @@ -162,7 +162,7 @@ class GitRepo: Flags: - --attribute-author: Modify Author name to "User Name (aider)". - --attribute-committer: Modify Committer name to "User Name (aider)". - - --attribute-co-authored-by: Add "Co-authored-by: aider () " + - --attribute-co-authored-by: Add "Co-authored-by: aider () " trailer to the commit message. Behavior Summary: @@ -240,7 +240,7 @@ class GitRepo: if coder and hasattr(coder, "main_model") and coder.main_model.name: model_name = coder.main_model.name commit_message_trailer = ( - f"\n\nCo-authored-by: aider ({model_name}) " + f"\n\nCo-authored-by: aider ({model_name}) " ) # Determine if author/committer names should be modified diff --git a/tests/basic/test_repo.py b/tests/basic/test_repo.py index 4d5abac86..400c307a8 100644 --- a/tests/basic/test_repo.py +++ b/tests/basic/test_repo.py @@ -265,7 +265,7 @@ class TestRepo(unittest.TestCase): # check the commit message and author/committer commit = raw_repo.head.commit - self.assertIn("Co-authored-by: aider (gpt-test) ", commit.message) + self.assertIn("Co-authored-by: aider (gpt-test) ", commit.message) self.assertEqual(commit.message.splitlines()[0], "Aider edit") # With default (None), co-authored-by takes precedence self.assertEqual(commit.author.name, "Test User", msg="Author name should not be modified when co-authored-by takes precedence") @@ -308,7 +308,7 @@ class TestRepo(unittest.TestCase): # check the commit message and author/committer commit = raw_repo.head.commit - self.assertIn("Co-authored-by: aider (gpt-test-combo) ", commit.message) + self.assertIn("Co-authored-by: aider (gpt-test-combo) ", commit.message) self.assertEqual(commit.message.splitlines()[0], "Aider combo edit") # When co-authored-by is true BUT author/committer are explicit True, modification SHOULD happen self.assertEqual(commit.author.name, "Test User (aider)", msg="Author name should be modified when explicitly True, even with co-author")