Only re-open a task if it's completed

This commit is contained in:
Jake Howard 2019-09-19 08:38:25 +01:00
parent 68dc7e7546
commit 6450c6dc57
Signed by: jake
GPG key ID: 57AFB45680EDD477

View file

@ -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)