actually using the extracted function

This commit is contained in:
Karma Riuk
2025-03-05 09:30:04 +01:00
parent 788f8db974
commit a0ac5b47ad

View File

@ -53,16 +53,7 @@ def process_pull_request(repo_url: str, pr_number: str) -> bool:
return False return False
# filter out the commits that are older than the first comment, since they are the commits relevant for the PR # filter out the commits that are older than the first comment, since they are the commits relevant for the PR
actual_commits = [] actual_commits = get_useful_commits(commits, first_comment_date)
for commit in commits:
if ("commit" not in commit
and "author" not in commit["author"]
and "date" not in commit['commit']['author']):
continue
commit_date = extract_date(commit['commit']['author']['date'])
if commit_date > first_comment_date:
actual_commits.append(commit)
if len(actual_commits) == 0: if len(actual_commits) == 0:
# No commits after the first comment, there were no revision from the contributor, so no triplet # No commits after the first comment, there were no revision from the contributor, so no triplet