Skip to content

Commit

Permalink
[communitybridge#3884] Bug/Github PR co-authors
Browse files Browse the repository at this point in the history
- Resolved fetching commit co-authors

Signed-off-by: Harold Wanyama <hwanyama@contractor.linuxfoundation.org>
  • Loading branch information
nickmango committed Apr 12, 2023
1 parent 3f88b8a commit 1554f7f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 43 deletions.
40 changes: 0 additions & 40 deletions cla-backend/cla/tests/unit/test_commit.py

This file was deleted.

6 changes: 3 additions & 3 deletions cla-backend/cla/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1833,9 +1833,9 @@ def get_co_authors_from_commit(commit):
"""
fn = "get_co_authors_from_commit"
co_authors = []
if commit.get("commit"):
commit_message = commit.get("commit").get("message")
if commit.commit:
commit_message = commit.commit.message
cla.log.debug(f'{fn} - commit message: {commit_message}')
if commit_message:
co_authors = re.findall(r"Co-authored-by: (.*) <(.*)>", commit_message)
return co_authors
return co_authors

0 comments on commit 1554f7f

Please sign in to comment.