add script for finding repos containing package.json

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2019-01-17 20:14:12 +01:00
parent f532b7c815
commit 50294c7e2f
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
3 changed files with 16 additions and 0 deletions

14
github/find_repos.py Executable file
View File

@ -0,0 +1,14 @@
#!/usr/bin/env python
import os
from github import Github
g = Github(os.environ['GH_TOKEN'])
org = g.get_organization('status-im')
for repo in org.get_repos():
contents = repo.get_dir_contents('/')
# check if repo contains package.json
found = [f for f in contents if f.path == 'package.json']
if len(found) > 0:
print(repo.name)

1
github/list_repos.py Normal file → Executable file
View File

@ -1,3 +1,4 @@
#!/usr/bin/env python
import pygithub3
gh = None

View File

@ -1 +1,2 @@
pygithub3
PyGithub