Ignore tasks with no defined todoist project

This commit is contained in:
Jake Howard 2019-08-30 18:46:13 +01:00
parent 43dcc129da
commit 87f08d5c40
Signed by: jake
GPG key ID: 57AFB45680EDD477
2 changed files with 4 additions and 0 deletions

View file

@ -36,6 +36,8 @@ def todoist_assigned_issues():
todoist.items.sync()
for issue in get_relevant_issues():
project_id = get_todoist_project_from_repo(issue.repository.full_name)
if not project_id:
continue
existing_tasks = get_existing_tasks(project_id, todoist)
me_assigned = me.login in {assignee.login for assignee in issue.assignees}
existing_task_id = get_existing_task(existing_tasks, issue)

View file

@ -30,6 +30,8 @@ def todoist_repo_prs():
todoist.items.sync()
for repo_name in REPOS:
project_id = get_todoist_project_from_repo(repo_name)
if not project_id:
continue
existing_tasks = {
item["id"]: item["content"]
for item in todoist.state["items"]