File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,7 +52,10 @@ def get_entries(self) -> List[Entry]:
5252
5353class Provider (AbstractProvider ):
5454 def get_log_entries (self , repo_path , start_date = None ):
55- repo = git .Repo (repo_path )
55+ try :
56+ repo = git .Repo (repo_path )
57+ except Exception :
58+ return
5659 for head in repo .heads :
5760 iterator = repo .iter_commits (head )
5861 for commit in iterator :
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ def get_entries(self) -> List[Entry]:
5252
5353 def get_projects (self ) -> List [Project ]:
5454 clients = self .provider .request ('me/clients' , method = 'GET' )
55- projects = self .provider .request ('me/projects' , method = 'GET' )
55+ new_projects = self .provider .request ('me/projects' , method = 'GET' )
5656 projects = []
5757 toggl_settings = cast (Any , settings .TOGGL )
5858 for client in clients :
@@ -62,7 +62,7 @@ def get_projects(self) -> List[Project]:
6262 groups .append (project )
6363 if not groups :
6464 continue
65- for project in projects :
65+ for project in new_projects :
6666 for group in groups :
6767 if project ['name' ] in toggl_settings [group ]['PROJECTS' ]:
6868 break
@@ -73,6 +73,8 @@ def get_projects(self) -> List[Project]:
7373 title = "{} - {}" .format (client ['name' ], project ['name' ]),
7474 group = group
7575 ))
76+ logger .warning ("Found project: %s - %s" , project ['id' ], project ['name' ])
77+
7678 return projects
7779
7880 def create_entry (self , new_entry : Entry , issue : Optional [Issue ]) -> Entry :
You can’t perform that action at this time.
0 commit comments