From a0ac5b47adde154c6552a0a1ba4154378bfd6731 Mon Sep 17 00:00:00 2001 From: Karma Riuk Date: Wed, 5 Mar 2025 09:30:04 +0100 Subject: [PATCH] actually using the extracted function --- pull_requests.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/pull_requests.py b/pull_requests.py index e200485..05816ce 100644 --- a/pull_requests.py +++ b/pull_requests.py @@ -53,16 +53,7 @@ def process_pull_request(repo_url: str, pr_number: str) -> bool: return False # filter out the commits that are older than the first comment, since they are the commits relevant for the PR - actual_commits = [] - 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) + actual_commits = get_useful_commits(commits, first_comment_date) if len(actual_commits) == 0: # No commits after the first comment, there were no revision from the contributor, so no triplet