def github_api(): return GithubRepoAPI( owner='test', repo_name='test', github_login='******', github_api_token='123', )
def create_api( owner: str, repo_name: str, github_login: str, github_api_token: str, ) -> GithubRepoAPI: return GithubRepoAPI(owner, repo_name, github_login, github_api_token)
def get_repos_names( owner: str, github_login: str, github_token: str, skip_archived: bool, ) -> List[str]: repos = GithubRepoAPI(owner, None, github_login, github_token).fetch_repos_list() or [] if skip_archived: repos = [r for r in repos if not r['archived']] repos.sort(key=operator.itemgetter('updated_at')) return [r['name'] for r in reversed(repos)]