rename of folder tools to code

This commit is contained in:
Trilarion
2020-01-10 16:46:46 +01:00
parent 30ce6187eb
commit 10625a854a
40 changed files with 30 additions and 25 deletions

20
code/utils/osg_github.py Normal file
View File

@ -0,0 +1,20 @@
"""
Everything specific to the Github API (via PyGithub).
"""
from github import Github
def retrieve_repo_info(repos):
"""
For a list of Github repos, retrieves repo information
"""
result = []
g = Github()
for repo in repos:
r = g.get_repo(repo)
e = {'archived': r.archived, 'description': r.description, 'language': r.language,
'last modified': r.last_modified, 'open issues count': r.open_issues_count,
'stars count': r.stargazers_count, 'topics': r.topics, 'repo': repo}
result.append(e)
return result