Skip to content

Commit

Permalink
Merge pull request #4068 from nickmango/bug/get-commit-authors-process
Browse files Browse the repository at this point in the history
Bug/Get Commit Authors
  • Loading branch information
nickmango authored Jul 29, 2023
2 parents d7ff541 + 0c80b69 commit c60dac7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cla-backend/cla/models/github_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ def update_change_request(self, installation_id, github_repository_id, change_re
cla.log.debug(f'{fn} - retrieved pull request: {pull_request}')

# Get all unique users/authors involved in this PR - returns a List[UserCommitSummary] objects
commit_authors = get_pull_request_commit_authors(pull_request, installation_id)
commit_authors = get_pull_request_commit_authors(pull_request)

try:
# Get existing repository info using the repository's external ID,
Expand Down Expand Up @@ -1344,7 +1344,7 @@ def get_author_summary(commit,pr) -> UserCommitSummary:



def get_pull_request_commit_authors(pull_request, installation_id=None) -> List[UserCommitSummary]:
def get_pull_request_commit_authors(pull_request) -> List[UserCommitSummary]:
"""
Helper function to extract all committer information for a GitHub PR.
Expand All @@ -1370,7 +1370,7 @@ def get_pull_request_commit_authors(pull_request, installation_id=None) -> List[
commit_authors = []

with multiprocessing.Pool(processes=num_processes) as pool:
commit_authors = pool.starmap(get_author_summary, zip(pull_request.get_commits(), pull_request.number))
commit_authors = pool.starmap(get_author_summary, [(commit, pull_request.number) for commit in pull_request.get_commits()])

return commit_authors

Expand Down

0 comments on commit c60dac7

Please sign in to comment.