From 6450c6dc57442e2abd61d02aee7eb45f535b5cbb Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Thu, 19 Sep 2019 08:38:25 +0100 Subject: [PATCH] Only re-open a task if it's completed --- actioner/scheduler/todoist_repo_prs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actioner/scheduler/todoist_repo_prs.py b/actioner/scheduler/todoist_repo_prs.py index 2bf4e65..3193d4c 100644 --- a/actioner/scheduler/todoist_repo_prs.py +++ b/actioner/scheduler/todoist_repo_prs.py @@ -56,7 +56,7 @@ def todoist_repo_prs(): ) ) todoist.items.complete(existing_task_id) - elif my_review.commit_id != pr.head.sha: + elif my_review.commit_id != pr.head.sha and task_completed: logger.info("Re-opening task to review '{}'".format(pr.title)) todoist.items.unarchive(existing_task_id) todoist.items.uncomplete(existing_task_id)