Skip to content

Commit

Permalink
[communitybridge#3884] Feature/Co-Committer
Browse files Browse the repository at this point in the history
- Added co-committer in Github PR checks when gating

Signed-off-by: Harold Wanyama <hwanyama@contractor.linuxfoundation.org>
  • Loading branch information
nickmango committed Apr 13, 2023
1 parent 87783ea commit 7538018
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion cla-backend/cla/models/github_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -954,8 +954,21 @@ def get_pull_request_commit_authors(pull_request) -> List[UserCommitSummary]:
)
cla.log.debug(f'{fn} - PR: {pull_request.number}, {commit_author_summary}')
commit_authors.append(commit_author_summary)
# check for co-author details in the commit message:
# check for co-author details| committer in the commit message:
# issue # 3884
# committter different from the author
if commit.committer:
if commit.committer.id != commit.author.id:
commit_author_summary = UserCommitSummary(
commit.sha,
commit.committer.id,
commit.committer.login,
commit.committer.name,
commit.committer.email,
False, False # default not authorized - will be evaluated and updated later
)
cla.log.debug(f'{fn} - Committer PR: {pull_request.number}, {commit_author_summary}')
commit_authors.append(commit_author_summary)
co_authors = cla.utils.get_co_authors_from_commit(commit)
for co_author in co_authors:
# check if co-author is a github user
Expand Down

0 comments on commit 7538018

Please sign in to comment.