diff options
author | Twist <itsluketwist@gmail.com> | 2022-08-22 18:00:37 +0100 |
---|---|---|
committer | Twist <itsluketwist@gmail.com> | 2022-08-22 18:00:37 +0100 |
commit | 146cbdaffdd1b551e6689f162e26226d5a351d6e (patch) | |
tree | 16ec594cbe18dc242de3c823b1bdc3de8905c802 /test/test_commit.py | |
parent | 12d91c6459422c034b790c8bcc5e429aa3a42c3b (diff) | |
download | gitpython-146cbdaffdd1b551e6689f162e26226d5a351d6e.tar.gz |
Add co_authors property to the Commit object, which parses the commit message for designated co-authors, include a simple test.
Diffstat (limited to 'test/test_commit.py')
-rw-r--r-- | test/test_commit.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/test_commit.py b/test/test_commit.py index 82126987..cf8e1db6 100644 --- a/test/test_commit.py +++ b/test/test_commit.py @@ -509,3 +509,14 @@ JzJMZDRLQLFvnzqZuCjE assert KEY_1 not in commit.trailers.keys() assert KEY_2 in commit.trailers.keys() assert commit.trailers[KEY_2] == VALUE_2 + + def test_commit_co_authors(self): + commit = copy.copy(self.rorepo.commit("4251bd5")) + commit.message = """Commit message + +Co-authored-by: Test User 1 <602352+test@users.noreply.github.com> +Co-authored-by: test_user_2 <another_user-email@.github.com>""" + assert commit.co_authors == [ + Actor("Test User 1", "602352+test@users.noreply.github.com"), + Actor("test_user_2", "another_user-email@.github.com"), + ] |