Ignore tasks with no defined todoist project
This commit is contained in:
parent
43dcc129da
commit
87f08d5c40
2 changed files with 4 additions and 0 deletions
|
@ -36,6 +36,8 @@ def todoist_assigned_issues():
|
||||||
todoist.items.sync()
|
todoist.items.sync()
|
||||||
for issue in get_relevant_issues():
|
for issue in get_relevant_issues():
|
||||||
project_id = get_todoist_project_from_repo(issue.repository.full_name)
|
project_id = get_todoist_project_from_repo(issue.repository.full_name)
|
||||||
|
if not project_id:
|
||||||
|
continue
|
||||||
existing_tasks = get_existing_tasks(project_id, todoist)
|
existing_tasks = get_existing_tasks(project_id, todoist)
|
||||||
me_assigned = me.login in {assignee.login for assignee in issue.assignees}
|
me_assigned = me.login in {assignee.login for assignee in issue.assignees}
|
||||||
existing_task_id = get_existing_task(existing_tasks, issue)
|
existing_task_id = get_existing_task(existing_tasks, issue)
|
||||||
|
|
|
@ -30,6 +30,8 @@ def todoist_repo_prs():
|
||||||
todoist.items.sync()
|
todoist.items.sync()
|
||||||
for repo_name in REPOS:
|
for repo_name in REPOS:
|
||||||
project_id = get_todoist_project_from_repo(repo_name)
|
project_id = get_todoist_project_from_repo(repo_name)
|
||||||
|
if not project_id:
|
||||||
|
continue
|
||||||
existing_tasks = {
|
existing_tasks = {
|
||||||
item["id"]: item["content"]
|
item["id"]: item["content"]
|
||||||
for item in todoist.state["items"]
|
for item in todoist.state["items"]
|
||||||
|
|
Reference in a new issue