diff --git a/actioner/scheduler/todoist_repo_prs.py b/actioner/scheduler/todoist_repo_prs.py index d45a392..867a984 100644 --- a/actioner/scheduler/todoist_repo_prs.py +++ b/actioner/scheduler/todoist_repo_prs.py @@ -18,7 +18,7 @@ def pr_to_task_name(pr: PullRequest) -> str: def get_my_review(me, pr: PullRequest): - for review in pr.get_reviews(): + for review in pr.get_reviews().reversed: if review.user.login == me.login: return review @@ -56,6 +56,7 @@ def todoist_repo_prs(): existing_task = todoist.items.get_by_id(existing_task_id) task_completed = is_task_completed(existing_task) if my_review: + print(pr, my_review, my_review.commit_id, pr.head.sha) if my_review.commit_id == pr.head.sha and not task_completed: logger.info( "Completing task to review '{}', because I already did it".format(