1
Fork 0

Fix comparison and stop completing then uncompleting tasks

This commit is contained in:
Jake Howard 2020-01-11 13:06:14 +00:00
parent 060ee12314
commit 802cc5a695
Signed by: jake
GPG key ID: 57AFB45680EDD477

View file

@ -26,10 +26,10 @@ def assigned_issues():
if not task:
continue
tasks_actioned.append(task["id"])
if assigned_issue == "closed" and not is_task_completed(task):
if assigned_issue.state == "closed" and not is_task_completed(task):
print("completing", assigned_issue)
task.complete()
if is_task_completed(task):
elif assigned_issue.state == "open" and is_task_completed(task):
print("uncompleting task", assigned_issue)
task.uncomplete()
if task["content"] != issue_to_task_name(assigned_issue):