File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -25,3 +25,26 @@ def get_commits(self, repo: Repository) -> List[Commit]:
2525 except Exception as e :
2626 logging .error (f"Failed to get commits from GitHub for repo { repo .name } : { e } " )
2727 return []
28+
29+ def get_contributors (self , repo : Repository ) -> List [Contributor ]:
30+ try :
31+ contributors = self .client .get_repo (repo .id ).get_contributors ()
32+ return [Contributor (c .login , c .email or "" ) for c in contributors ]
33+ except Exception as e :
34+ logging .error (f"Failed to get contributors from GitHub for repo { repo .name } : { e } " )
35+ return []
36+
37+ def get_issues (self , repo : Repository ) -> List [Issue ]:
38+ try :
39+ issues = self .client .get_repo (repo .id ).get_issues (state = 'all' )
40+ return [
41+ Issue (
42+ i .number ,
43+ i .title ,
44+ Contributor (i .user .login , i .user .email or "" ),
45+ i .state
46+ ) for i in issues
47+ ]
48+ except Exception as e :
49+ logging .error (f"Failed to get issues from GitHub for repo { repo .name } : { e } " )
50+ return []
You can’t perform that action at this time.
0 commit comments