compacted code

This commit is contained in:
Karma Riuk
2025-03-05 09:55:19 +01:00
parent cb7c1a94a1
commit b9501f9aac

View File

@ -77,14 +77,10 @@ def process_pull_request(repo_url: str, pr_number: str) -> bool:
first_comment_date = get_first_comment_date(comments) first_comment_date = get_first_comment_date(comments)
commits = get_commits(repo_url, pr_number)
if len(commits) == 0: # get commits and filter out the ones that are older than the first
# No commits, can't extract triplet # comment, since they are the commits relevant for the PR
return False actual_commits = get_useful_commits(get_commits(repo_url, pr_number), first_comment_date)
# filter out the commits that are older than the first comment, since they are the commits relevant for the PR
actual_commits = get_useful_commits(commits, first_comment_date)
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