add script for adding user to repos

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2019-10-17 11:41:57 +02:00
parent 5a0e38de09
commit 9c02c8b301
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
1 changed files with 22 additions and 0 deletions

22
github/add_user_to_private.py Executable file
View File

@ -0,0 +1,22 @@
#!/usr/bin/env python3
import os
from github import Github
gh = Github(os.environ['GH_TOKEN'])
org = gh.get_organization('status-im')
#print("Scopes:", gh.oauth_scopes)
for repo in org.get_repos():
skip = any([
repo.fork,
repo.archived,
not repo.private,
repo.name.endswith('-pass'),
])
if skip:
continue
print(repo)
repo.add_to_collaborators('status-im-auto', permission='pull')