In [ ]:
import github3
In [ ]:
gh = github3.login('willingc', '')
In [ ]:
type(gh)
In [ ]:
willingc = gh.user('willingc')
In [ ]:
type(willingc)
In [ ]:
print(willingc.name)
In [ ]:
# print followers
for f in willingc.followers():
print(f)
In [ ]:
# print a dictionary of user's content
print(willingc.as_dict())
In [ ]:
gists = [g for g in gh.gists()]
In [ ]:
gists[0].as_dict()
In [ ]:
# Get all Jupyter repos
repos = [r.refresh() for r in gh.repositories_by('jupyter')]
In [ ]:
for repo in repos:
print(repo.name, repo.url)
print(' ', repo.description)
print(' ', repo.homepage)
print(' Open ', repo.open_issues_count)
In [ ]:
# Get all IPython repos
repos = [r.refresh() for r in gh.repositories_by('ipython')]
In [ ]:
for repo in repos:
print(repo.name, repo.url)
print(' ', repo.description)
print(' ', repo.homepage)
In [ ]:
for org in willingc.organizations():
print(org.url)
In [ ]:
willingc.organizations().as_dict
In [ ]:
sub_jup_ui = ['jupyter/notebook', 'jupyter/jupyter_console', 'jupyter/qtconsole']
sub_kernels = ['ipython/ipython', 'ipython/ipythonwidgets', 'ipython/ipyparallel']
sub_formatting = ['jupyter/nbconvert', 'jupyter/nbformat']
sub_education = ['jupyter/nbgrader']
sub_deployment= ['jupyter/jupyterhub', 'jupyter/jupyter-drive', 'jupyter/nbviewer','jupyter/tmpnb', 'jupyter/tmpnb-deploy','jupyter/dockerspawner','jupyter/docker-stacks']
sub_architecture = ['jupyter/jupyter_client', 'jupyter/jupyter_core']
In [ ]:
for subproject in sub_jup_ui:
print(subproject)
In [ ]:
for issue in willingc.iter_repo_issues('jupyter','notebook'):
if issue.state == 'open':
print(issue.number, issue.title)
myissues = willingc.iter_repo_issues('jupyter','notebook')
In [ ]:
for issue in gh.iter_repo_issues(owner='jupyter', repository='jupyter'):
print(issue.number, issue.title)
print(issue.labels)
print(issue.created_at)
print(issue.updated_at)
In [ ]:
In [ ]:
def list_issues(token, owner='jupyter', repo=repo):
for issue in token.iter_repo_issues(owner=owner, repository=repo):
if issue.state == 'open':
print(issue.number, issue.title)
In [ ]: