archive
/
actioner
Archived
1
Fork 0
This repository has been archived on 2023-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
actioner/actioner/utils/__init__.py

15 lines
392 B
Python

from typing import Dict, Optional
GH_REPO_TO_TODOIST = {} # type: Dict[str, int]
GH_ORG_TO_TODOIST = {"srobo": 2206772654} # type: Dict[str, int]
def get_todoist_project_from_repo(repo_name: str) -> Optional[int]:
repo_id = GH_REPO_TO_TODOIST.get(repo_name)
if repo_id is not None:
return repo_id
org = repo_name.split("/")[0]
return GH_ORG_TO_TODOIST.get(org)