Fix issue which resulted in constantly re-opening and closing tasks

This commit is contained in:
Jake Howard 2019-09-06 09:27:06 +01:00
parent 9578dfaa93
commit deaa813ca8
Signed by: jake
GPG key ID: 57AFB45680EDD477

View file

@ -56,7 +56,7 @@ def todoist_repo_prs():
) )
) )
todoist.items.complete(existing_task_id) todoist.items.complete(existing_task_id)
elif task_completed: elif my_review.commit_id != pr.head.sha:
logger.info("Re-opening task to review '{}'".format(pr.title)) logger.info("Re-opening task to review '{}'".format(pr.title))
todoist.items.unarchive(existing_task_id) todoist.items.unarchive(existing_task_id)
todoist.items.uncomplete(existing_task_id) todoist.items.uncomplete(existing_task_id)