Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit09f8a1b

Browse files
committed
Use the same regex as the Actor class when determining co-authors.
1 parentc2fd97e commit09f8a1b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

‎git/objects/commit.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -752,11 +752,11 @@ def co_authors(self) -> List[Actor]:
752752

753753
ifself.message:
754754
results=re.findall(
755-
r"^Co-authored-by: ((?:\w|\-| ){0,38} <\S*>)$",
755+
r"^Co-authored-by: (.*) <(.*?)>$",
756756
self.message,
757757
re.MULTILINE,
758758
)
759-
forauthor_stringinresults:
760-
co_authors.append(Actor._from_string(author_string))
759+
forauthorinresults:
760+
co_authors.append(Actor(*author))
761761

762762
returnco_authors

‎test/test_commit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ def test_commit_co_authors(self):
517517
Co-authored-by: Test User 1 <602352+test@users.noreply.github.com>
518518
Co-authored-by: test_user_2 <another_user-email@github.com>
519519
Co_authored_by: test_user_x <test@github.com>
520-
Co-authored-by: test_user_y <poorly formatted email@github.com>
520+
Co-authored-by: test_user_y <test@github.com> text
521521
Co-authored-by: test_user_3 <test_user_3@github.com>"""
522522
assertcommit.co_authors== [
523523
Actor("Test User 1","602352+test@users.noreply.github.com"),

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp