def create_repo_for_existing_local(repo_identifier, root, organization='NMGRLData'): from pychron.git_archive.repo_manager import GitRepoManager repo = GitRepoManager() proot = os.path.join(root, repo_identifier) repo.open_repo(proot) org = Organization(organization) if not org.has_repo(repo_identifier): usr = os.environ.get('GITHUB_USER') pwd = os.environ.get('GITHUB_PASSWORD') org.create_repo(repo_identifier, usr, pwd) url = 'https://github.com/{}/{}.git'.format(organization, repo_identifier) repo.create_remote(url)
def create_github_repo(name): org = Organization(ORG) if not org.has_repo(name): usr = os.environ.get('GITHUB_USER') pwd = os.environ.get('GITHUB_PASSWORD') org.create_repo(name, usr, pwd)