8000 Update regex to extract the author string, and create the Actor using… · gal-leib/GitPython@c2fd97e · GitHub
[go: up one dir, main page]

Skip to content

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

Appearance settings

Commit c2fd97e

Browse files
committed
Update regex to extract the author string, and create the Actor using the _from_string classmethod.
1 parent 3cb7ecf commit c2fd97e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
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
if self.message:
754754
results = re.findall(
755-
r"^Co-authored-by: ((?:\w|\-| ){0,38}) <(\S*)>$",
755+
r"^Co-authored-by: ((?:\w|\-| ){0,38} <\S*>)$",
756756
self.message,
757757
re.MULTILINE,
758758
)
759-
for author in results:
760-
co_authors.append(Actor(*author))
759+
for author_string in results:
760+
co_authors.append(Actor._from_string(author_string))
761761

762762
return co_authors

0 commit comments

Comments
 (0)
0