Don't pass lists where it expects single items
This definitely worked in the past...
This commit is contained in:
parent
2ef14e8d9e
commit
ce78472619
2 changed files with 5 additions and 5 deletions
|
@ -36,7 +36,7 @@ def todoist_assigned_issues():
|
||||||
|
|
||||||
if existing_task_id and not me_assigned:
|
if existing_task_id and not me_assigned:
|
||||||
logger.info("Deleting task for '{}'".format(issue.title))
|
logger.info("Deleting task for '{}'".format(issue.title))
|
||||||
todoist.items.delete([existing_task_id])
|
todoist.items.delete(existing_task_id)
|
||||||
|
|
||||||
if not me_assigned:
|
if not me_assigned:
|
||||||
continue
|
continue
|
||||||
|
@ -59,7 +59,7 @@ def todoist_assigned_issues():
|
||||||
|
|
||||||
if is_task_completed(existing_task):
|
if is_task_completed(existing_task):
|
||||||
logger.info("Re-opening task '{}'".format(issue.title))
|
logger.info("Re-opening task '{}'".format(issue.title))
|
||||||
todoist.items.uncomplete([existing_task_id])
|
todoist.items.uncomplete(existing_task_id)
|
||||||
|
|
||||||
existing_task.update(
|
existing_task.update(
|
||||||
content=issue_to_task_name(issue), priority=get_status_for_issue(issue)
|
content=issue_to_task_name(issue), priority=get_status_for_issue(issue)
|
||||||
|
|
|
@ -37,10 +37,10 @@ def todoist_repo_prs():
|
||||||
if pr.merged and my_review and my_review.state == "APPROVED":
|
if pr.merged and my_review and my_review.state == "APPROVED":
|
||||||
if not is_task_completed(todoist.items.get_by_id(existing_task_id)):
|
if not is_task_completed(todoist.items.get_by_id(existing_task_id)):
|
||||||
logger.info("Completing task to review '{}'".format(pr.title))
|
logger.info("Completing task to review '{}'".format(pr.title))
|
||||||
todoist.items.complete([existing_task_id])
|
todoist.items.complete(existing_task_id)
|
||||||
else:
|
else:
|
||||||
logger.info("Deleting task to review '{}'".format(pr.title))
|
logger.info("Deleting task to review '{}'".format(pr.title))
|
||||||
todoist.items.delete([existing_task_id])
|
todoist.items.delete(existing_task_id)
|
||||||
|
|
||||||
elif pr.state == "open":
|
elif pr.state == "open":
|
||||||
my_review = get_my_review(me, pr)
|
my_review = get_my_review(me, pr)
|
||||||
|
@ -58,7 +58,7 @@ def todoist_repo_prs():
|
||||||
todoist.items.complete([existing_task_id])
|
todoist.items.complete([existing_task_id])
|
||||||
elif task_completed:
|
elif task_completed:
|
||||||
logger.info("Re-opening task to review '{}'".format(pr.title))
|
logger.info("Re-opening task to review '{}'".format(pr.title))
|
||||||
todoist.items.uncomplete([existing_task_id])
|
todoist.items.uncomplete(existing_task_id)
|
||||||
continue
|
continue
|
||||||
elif my_review and my_review.commit_id != pr.head.sha:
|
elif my_review and my_review.commit_id != pr.head.sha:
|
||||||
logger.info("Creating task to review '{}'".format(pr.title))
|
logger.info("Creating task to review '{}'".format(pr.title))
|
||||||
|
|
Reference in a new issue